diff options
author | tb <> | 2018-05-18 17:53:09 +0000 |
---|---|---|
committer | tb <> | 2018-05-18 17:53:09 +0000 |
commit | 8038c0f82c48b5e93d4c22d4bba6bfdd2c514b5b (patch) | |
tree | 45c7629c815aefe9ff1cd7f52f0018e4c4cf8ee5 /src/lib | |
parent | c0ef04d3bfc547c923277c3f9e8f7806a13404eb (diff) | |
download | openbsd-8038c0f82c48b5e93d4c22d4bba6bfdd2c514b5b.tar.gz openbsd-8038c0f82c48b5e93d4c22d4bba6bfdd2c514b5b.tar.bz2 openbsd-8038c0f82c48b5e93d4c22d4bba6bfdd2c514b5b.zip |
Add const qualifiers to the 'obj' and 'bytes' arguments of
X509_NAME_ENTRY_create_by_NID(3), X509_NAME_ENTRY_create_by_OBJ(3), and
X509_NAME_ENTRY_set_object(3).
tested in a bulk build by sthen
ok jsing
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libcrypto/x509/x509.h | 10 | ||||
-rw-r--r-- | src/lib/libcrypto/x509/x509name.c | 10 |
2 files changed, 10 insertions, 10 deletions
diff --git a/src/lib/libcrypto/x509/x509.h b/src/lib/libcrypto/x509/x509.h index 1ddf276a93..44585c943f 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.51 2018/05/18 16:55:58 tb Exp $ */ | 1 | /* $OpenBSD: x509.h,v 1.52 2018/05/18 17:53:09 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 | * |
@@ -1112,14 +1112,14 @@ int X509_NAME_add_entry_by_NID(X509_NAME *name, int nid, int type, | |||
1112 | X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_txt(X509_NAME_ENTRY **ne, | 1112 | X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_txt(X509_NAME_ENTRY **ne, |
1113 | const char *field, int type, const unsigned char *bytes, int len); | 1113 | const char *field, int type, const unsigned char *bytes, int len); |
1114 | X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_NID(X509_NAME_ENTRY **ne, int nid, | 1114 | X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_NID(X509_NAME_ENTRY **ne, int nid, |
1115 | int type,unsigned char *bytes, int len); | 1115 | int type, const unsigned char *bytes, int len); |
1116 | int X509_NAME_add_entry_by_txt(X509_NAME *name, const char *field, int type, | 1116 | int X509_NAME_add_entry_by_txt(X509_NAME *name, const char *field, int type, |
1117 | const unsigned char *bytes, int len, int loc, int set); | 1117 | const unsigned char *bytes, int len, int loc, int set); |
1118 | X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_OBJ(X509_NAME_ENTRY **ne, | 1118 | X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_OBJ(X509_NAME_ENTRY **ne, |
1119 | ASN1_OBJECT *obj, int type,const unsigned char *bytes, | 1119 | const ASN1_OBJECT *obj, int type, |
1120 | int len); | 1120 | const unsigned char *bytes, int len); |
1121 | int X509_NAME_ENTRY_set_object(X509_NAME_ENTRY *ne, | 1121 | int X509_NAME_ENTRY_set_object(X509_NAME_ENTRY *ne, |
1122 | ASN1_OBJECT *obj); | 1122 | const ASN1_OBJECT *obj); |
1123 | int X509_NAME_ENTRY_set_data(X509_NAME_ENTRY *ne, int type, | 1123 | int X509_NAME_ENTRY_set_data(X509_NAME_ENTRY *ne, int type, |
1124 | const unsigned char *bytes, int len); | 1124 | const unsigned char *bytes, int len); |
1125 | ASN1_OBJECT * X509_NAME_ENTRY_get_object(const X509_NAME_ENTRY *ne); | 1125 | ASN1_OBJECT * X509_NAME_ENTRY_get_object(const X509_NAME_ENTRY *ne); |
diff --git a/src/lib/libcrypto/x509/x509name.c b/src/lib/libcrypto/x509/x509name.c index 3912ca039e..678b073a39 100644 --- a/src/lib/libcrypto/x509/x509name.c +++ b/src/lib/libcrypto/x509/x509name.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: x509name.c,v 1.17 2018/05/01 19:01:28 tb Exp $ */ | 1 | /* $OpenBSD: x509name.c,v 1.18 2018/05/18 17:53:09 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 | * |
@@ -308,7 +308,7 @@ X509_NAME_ENTRY_create_by_txt(X509_NAME_ENTRY **ne, | |||
308 | 308 | ||
309 | X509_NAME_ENTRY * | 309 | X509_NAME_ENTRY * |
310 | X509_NAME_ENTRY_create_by_NID(X509_NAME_ENTRY **ne, int nid, int type, | 310 | X509_NAME_ENTRY_create_by_NID(X509_NAME_ENTRY **ne, int nid, int type, |
311 | unsigned char *bytes, int len) | 311 | const unsigned char *bytes, int len) |
312 | { | 312 | { |
313 | ASN1_OBJECT *obj; | 313 | ASN1_OBJECT *obj; |
314 | X509_NAME_ENTRY *nentry; | 314 | X509_NAME_ENTRY *nentry; |
@@ -324,8 +324,8 @@ X509_NAME_ENTRY_create_by_NID(X509_NAME_ENTRY **ne, int nid, int type, | |||
324 | } | 324 | } |
325 | 325 | ||
326 | X509_NAME_ENTRY * | 326 | X509_NAME_ENTRY * |
327 | X509_NAME_ENTRY_create_by_OBJ(X509_NAME_ENTRY **ne, ASN1_OBJECT *obj, int type, | 327 | X509_NAME_ENTRY_create_by_OBJ(X509_NAME_ENTRY **ne, const ASN1_OBJECT *obj, |
328 | const unsigned char *bytes, int len) | 328 | int type, const unsigned char *bytes, int len) |
329 | { | 329 | { |
330 | X509_NAME_ENTRY *ret; | 330 | X509_NAME_ENTRY *ret; |
331 | 331 | ||
@@ -351,7 +351,7 @@ err: | |||
351 | } | 351 | } |
352 | 352 | ||
353 | int | 353 | int |
354 | X509_NAME_ENTRY_set_object(X509_NAME_ENTRY *ne, ASN1_OBJECT *obj) | 354 | X509_NAME_ENTRY_set_object(X509_NAME_ENTRY *ne, const ASN1_OBJECT *obj) |
355 | { | 355 | { |
356 | if ((ne == NULL) || (obj == NULL)) { | 356 | if ((ne == NULL) || (obj == NULL)) { |
357 | X509error(ERR_R_PASSED_NULL_PARAMETER); | 357 | X509error(ERR_R_PASSED_NULL_PARAMETER); |