diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2018-05-18 18:37:24 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2018-05-18 18:37:24 +0000 |
commit | f4340dad520aa139cd348de683f00a36901115b1 (patch) | |
tree | 18d6cb9493a40b913a8d49e14d5afb4686014bda /lib | |
parent | cb30101b66e06102e1137a0748e3aa0864e2a3aa (diff) |
Add const qualifiers to the x and obj qualifiers of
X509_REVOKED_get_ext(3), X509_REVOKED_get_ext_count(3),
X509_REVOKED_get_ext_by_NID(3), X509_REVOKED_get_ext_by_OBJ(3),
X509_REVOKED_get_ext_by_critical(3), X509_REVOKED_get_ext_d2i(3).
tested in a bulk build by sthen
ok jsing
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libcrypto/x509/x509.h | 25 | ||||
-rw-r--r-- | lib/libcrypto/x509/x509_ext.c | 15 |
2 files changed, 23 insertions, 17 deletions
diff --git a/lib/libcrypto/x509/x509.h b/lib/libcrypto/x509/x509.h index d4efaf3eca0..2be1e3c0007 100644 --- a/lib/libcrypto/x509/x509.h +++ b/lib/libcrypto/x509/x509.h @@ -1,4 +1,4 @@ -/* $OpenBSD: x509.h,v 1.60 2018/05/18 18:23:24 tb Exp $ */ +/* $OpenBSD: x509.h,v 1.61 2018/05/18 18:37:23 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -1166,16 +1166,21 @@ void * X509_CRL_get_ext_d2i(const X509_CRL *x, int nid, int *crit, int X509_CRL_add1_ext_i2d(X509_CRL *x, int nid, void *value, int crit, unsigned long flags); -int X509_REVOKED_get_ext_count(X509_REVOKED *x); -int X509_REVOKED_get_ext_by_NID(X509_REVOKED *x, int nid, int lastpos); -int X509_REVOKED_get_ext_by_OBJ(X509_REVOKED *x,ASN1_OBJECT *obj,int lastpos); -int X509_REVOKED_get_ext_by_critical(X509_REVOKED *x, int crit, int lastpos); -X509_EXTENSION *X509_REVOKED_get_ext(X509_REVOKED *x, int loc); +int X509_REVOKED_get_ext_count(const X509_REVOKED *x); +int X509_REVOKED_get_ext_by_NID(const X509_REVOKED *x, int nid, + int lastpos); +int X509_REVOKED_get_ext_by_OBJ(const X509_REVOKED *x, + const ASN1_OBJECT *obj, int lastpos); +int X509_REVOKED_get_ext_by_critical(const X509_REVOKED *x, + int crit, int lastpos); +X509_EXTENSION *X509_REVOKED_get_ext(const X509_REVOKED *x, int loc); X509_EXTENSION *X509_REVOKED_delete_ext(X509_REVOKED *x, int loc); -int X509_REVOKED_add_ext(X509_REVOKED *x, X509_EXTENSION *ex, int loc); -void * X509_REVOKED_get_ext_d2i(X509_REVOKED *x, int nid, int *crit, int *idx); -int X509_REVOKED_add1_ext_i2d(X509_REVOKED *x, int nid, void *value, int crit, - unsigned long flags); +int X509_REVOKED_add_ext(X509_REVOKED *x, X509_EXTENSION *ex, + int loc); +void * X509_REVOKED_get_ext_d2i(const X509_REVOKED *x, int nid, + int *crit, int *idx); +int X509_REVOKED_add1_ext_i2d(X509_REVOKED *x, int nid, void *value, + int crit, unsigned long flags); X509_EXTENSION *X509_EXTENSION_create_by_NID(X509_EXTENSION **ex, int nid, int crit, ASN1_OCTET_STRING *data); diff --git a/lib/libcrypto/x509/x509_ext.c b/lib/libcrypto/x509/x509_ext.c index a0f85426efc..2903f2b7a1a 100644 --- a/lib/libcrypto/x509/x509_ext.c +++ b/lib/libcrypto/x509/x509_ext.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x509_ext.c,v 1.10 2018/05/18 14:19:46 tb Exp $ */ +/* $OpenBSD: x509_ext.c,v 1.11 2018/05/18 18:37:23 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -177,31 +177,32 @@ X509_add1_ext_i2d(X509 *x, int nid, void *value, int crit, unsigned long flags) } int -X509_REVOKED_get_ext_count(X509_REVOKED *x) +X509_REVOKED_get_ext_count(const X509_REVOKED *x) { return (X509v3_get_ext_count(x->extensions)); } int -X509_REVOKED_get_ext_by_NID(X509_REVOKED *x, int nid, int lastpos) +X509_REVOKED_get_ext_by_NID(const X509_REVOKED *x, int nid, int lastpos) { return (X509v3_get_ext_by_NID(x->extensions, nid, lastpos)); } int -X509_REVOKED_get_ext_by_OBJ(X509_REVOKED *x, ASN1_OBJECT *obj, int lastpos) +X509_REVOKED_get_ext_by_OBJ(const X509_REVOKED *x, const ASN1_OBJECT *obj, + int lastpos) { return (X509v3_get_ext_by_OBJ(x->extensions, obj, lastpos)); } int -X509_REVOKED_get_ext_by_critical(X509_REVOKED *x, int crit, int lastpos) +X509_REVOKED_get_ext_by_critical(const X509_REVOKED *x, int crit, int lastpos) { return (X509v3_get_ext_by_critical(x->extensions, crit, lastpos)); } X509_EXTENSION * -X509_REVOKED_get_ext(X509_REVOKED *x, int loc) +X509_REVOKED_get_ext(const X509_REVOKED *x, int loc) { return (X509v3_get_ext(x->extensions, loc)); } @@ -219,7 +220,7 @@ X509_REVOKED_add_ext(X509_REVOKED *x, X509_EXTENSION *ex, int loc) } void * -X509_REVOKED_get_ext_d2i(X509_REVOKED *x, int nid, int *crit, int *idx) +X509_REVOKED_get_ext_d2i(const X509_REVOKED *x, int nid, int *crit, int *idx) { return X509V3_get_d2i(x->extensions, nid, crit, idx); } |