diff options
| author | tb <> | 2018-05-18 18:37:23 +0000 |
|---|---|---|
| committer | tb <> | 2018-05-18 18:37:23 +0000 |
| commit | 51c5ab9e5435b41715f5ca9cc2ed04fe5aabb139 (patch) | |
| tree | 57996d7f6764b7bbf67c568dd5aa5601c7cf762c | |
| parent | 2c0fed57d798deeb5b436a401bcfe6524db1ddf7 (diff) | |
| download | openbsd-51c5ab9e5435b41715f5ca9cc2ed04fe5aabb139.tar.gz openbsd-51c5ab9e5435b41715f5ca9cc2ed04fe5aabb139.tar.bz2 openbsd-51c5ab9e5435b41715f5ca9cc2ed04fe5aabb139.zip | |
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 '')
| -rw-r--r-- | src/lib/libcrypto/x509/x509.h | 25 | ||||
| -rw-r--r-- | src/lib/libcrypto/x509/x509_ext.c | 15 |
2 files changed, 23 insertions, 17 deletions
diff --git a/src/lib/libcrypto/x509/x509.h b/src/lib/libcrypto/x509/x509.h index d4efaf3eca..2be1e3c000 100644 --- a/src/lib/libcrypto/x509/x509.h +++ b/src/lib/libcrypto/x509/x509.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: x509.h,v 1.60 2018/05/18 18:23:24 tb Exp $ */ | 1 | /* $OpenBSD: x509.h,v 1.61 2018/05/18 18:37:23 tb Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -1166,16 +1166,21 @@ void * X509_CRL_get_ext_d2i(const X509_CRL *x, int nid, int *crit, | |||
| 1166 | int X509_CRL_add1_ext_i2d(X509_CRL *x, int nid, void *value, | 1166 | int X509_CRL_add1_ext_i2d(X509_CRL *x, int nid, void *value, |
| 1167 | int crit, unsigned long flags); | 1167 | int crit, unsigned long flags); |
| 1168 | 1168 | ||
| 1169 | int X509_REVOKED_get_ext_count(X509_REVOKED *x); | 1169 | int X509_REVOKED_get_ext_count(const X509_REVOKED *x); |
| 1170 | int X509_REVOKED_get_ext_by_NID(X509_REVOKED *x, int nid, int lastpos); | 1170 | int X509_REVOKED_get_ext_by_NID(const X509_REVOKED *x, int nid, |
| 1171 | int X509_REVOKED_get_ext_by_OBJ(X509_REVOKED *x,ASN1_OBJECT *obj,int lastpos); | 1171 | int lastpos); |
| 1172 | int X509_REVOKED_get_ext_by_critical(X509_REVOKED *x, int crit, int lastpos); | 1172 | int X509_REVOKED_get_ext_by_OBJ(const X509_REVOKED *x, |
| 1173 | X509_EXTENSION *X509_REVOKED_get_ext(X509_REVOKED *x, int loc); | 1173 | const ASN1_OBJECT *obj, int lastpos); |
| 1174 | int X509_REVOKED_get_ext_by_critical(const X509_REVOKED *x, | ||
| 1175 | int crit, int lastpos); | ||
| 1176 | X509_EXTENSION *X509_REVOKED_get_ext(const X509_REVOKED *x, int loc); | ||
| 1174 | X509_EXTENSION *X509_REVOKED_delete_ext(X509_REVOKED *x, int loc); | 1177 | X509_EXTENSION *X509_REVOKED_delete_ext(X509_REVOKED *x, int loc); |
| 1175 | int X509_REVOKED_add_ext(X509_REVOKED *x, X509_EXTENSION *ex, int loc); | 1178 | int X509_REVOKED_add_ext(X509_REVOKED *x, X509_EXTENSION *ex, |
| 1176 | void * X509_REVOKED_get_ext_d2i(X509_REVOKED *x, int nid, int *crit, int *idx); | 1179 | int loc); |
| 1177 | int X509_REVOKED_add1_ext_i2d(X509_REVOKED *x, int nid, void *value, int crit, | 1180 | void * X509_REVOKED_get_ext_d2i(const X509_REVOKED *x, int nid, |
| 1178 | unsigned long flags); | 1181 | int *crit, int *idx); |
| 1182 | int X509_REVOKED_add1_ext_i2d(X509_REVOKED *x, int nid, void *value, | ||
| 1183 | int crit, unsigned long flags); | ||
| 1179 | 1184 | ||
| 1180 | X509_EXTENSION *X509_EXTENSION_create_by_NID(X509_EXTENSION **ex, | 1185 | X509_EXTENSION *X509_EXTENSION_create_by_NID(X509_EXTENSION **ex, |
| 1181 | int nid, int crit, ASN1_OCTET_STRING *data); | 1186 | int nid, int crit, ASN1_OCTET_STRING *data); |
diff --git a/src/lib/libcrypto/x509/x509_ext.c b/src/lib/libcrypto/x509/x509_ext.c index a0f85426ef..2903f2b7a1 100644 --- a/src/lib/libcrypto/x509/x509_ext.c +++ b/src/lib/libcrypto/x509/x509_ext.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: x509_ext.c,v 1.10 2018/05/18 14:19:46 tb Exp $ */ | 1 | /* $OpenBSD: x509_ext.c,v 1.11 2018/05/18 18:37:23 tb Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -177,31 +177,32 @@ X509_add1_ext_i2d(X509 *x, int nid, void *value, int crit, unsigned long flags) | |||
| 177 | } | 177 | } |
| 178 | 178 | ||
| 179 | int | 179 | int |
| 180 | X509_REVOKED_get_ext_count(X509_REVOKED *x) | 180 | X509_REVOKED_get_ext_count(const X509_REVOKED *x) |
| 181 | { | 181 | { |
| 182 | return (X509v3_get_ext_count(x->extensions)); | 182 | return (X509v3_get_ext_count(x->extensions)); |
| 183 | } | 183 | } |
| 184 | 184 | ||
| 185 | int | 185 | int |
| 186 | X509_REVOKED_get_ext_by_NID(X509_REVOKED *x, int nid, int lastpos) | 186 | X509_REVOKED_get_ext_by_NID(const X509_REVOKED *x, int nid, int lastpos) |
| 187 | { | 187 | { |
| 188 | return (X509v3_get_ext_by_NID(x->extensions, nid, lastpos)); | 188 | return (X509v3_get_ext_by_NID(x->extensions, nid, lastpos)); |
| 189 | } | 189 | } |
| 190 | 190 | ||
| 191 | int | 191 | int |
| 192 | X509_REVOKED_get_ext_by_OBJ(X509_REVOKED *x, ASN1_OBJECT *obj, int lastpos) | 192 | X509_REVOKED_get_ext_by_OBJ(const X509_REVOKED *x, const ASN1_OBJECT *obj, |
| 193 | int lastpos) | ||
| 193 | { | 194 | { |
| 194 | return (X509v3_get_ext_by_OBJ(x->extensions, obj, lastpos)); | 195 | return (X509v3_get_ext_by_OBJ(x->extensions, obj, lastpos)); |
| 195 | } | 196 | } |
| 196 | 197 | ||
| 197 | int | 198 | int |
| 198 | X509_REVOKED_get_ext_by_critical(X509_REVOKED *x, int crit, int lastpos) | 199 | X509_REVOKED_get_ext_by_critical(const X509_REVOKED *x, int crit, int lastpos) |
| 199 | { | 200 | { |
| 200 | return (X509v3_get_ext_by_critical(x->extensions, crit, lastpos)); | 201 | return (X509v3_get_ext_by_critical(x->extensions, crit, lastpos)); |
| 201 | } | 202 | } |
| 202 | 203 | ||
| 203 | X509_EXTENSION * | 204 | X509_EXTENSION * |
| 204 | X509_REVOKED_get_ext(X509_REVOKED *x, int loc) | 205 | X509_REVOKED_get_ext(const X509_REVOKED *x, int loc) |
| 205 | { | 206 | { |
| 206 | return (X509v3_get_ext(x->extensions, loc)); | 207 | return (X509v3_get_ext(x->extensions, loc)); |
| 207 | } | 208 | } |
| @@ -219,7 +220,7 @@ X509_REVOKED_add_ext(X509_REVOKED *x, X509_EXTENSION *ex, int loc) | |||
| 219 | } | 220 | } |
| 220 | 221 | ||
| 221 | void * | 222 | void * |
| 222 | X509_REVOKED_get_ext_d2i(X509_REVOKED *x, int nid, int *crit, int *idx) | 223 | X509_REVOKED_get_ext_d2i(const X509_REVOKED *x, int nid, int *crit, int *idx) |
| 223 | { | 224 | { |
| 224 | return X509V3_get_d2i(x->extensions, nid, crit, idx); | 225 | return X509V3_get_d2i(x->extensions, nid, crit, idx); |
| 225 | } | 226 | } |
