diff options
author | tb <> | 2018-05-18 18:02:07 +0000 |
---|---|---|
committer | tb <> | 2018-05-18 18:02:07 +0000 |
commit | c9322b9a693035cc0be62179f07b3d393193cda1 (patch) | |
tree | f8b2d10af4f86b15d8783c3b72160170d51869e3 | |
parent | ed50d2df6e31a2b7e21685507224930405da7aa9 (diff) | |
download | openbsd-c9322b9a693035cc0be62179f07b3d393193cda1.tar.gz openbsd-c9322b9a693035cc0be62179f07b3d393193cda1.tar.bz2 openbsd-c9322b9a693035cc0be62179f07b3d393193cda1.zip |
The 'bytes' arguments of X509_NAME_add_entry_by_NID(3) and
X509_NAME_add_entry_by_OBJ(3) are now const.
tested in a bulk build by sthen
ok jsing
-rw-r--r-- | src/lib/libcrypto/x509/x509.h | 6 | ||||
-rw-r--r-- | src/lib/libcrypto/x509/x509name.c | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/libcrypto/x509/x509.h b/src/lib/libcrypto/x509/x509.h index 43af626613..788d97aaa4 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.54 2018/05/18 17:59:16 tb Exp $ */ | 1 | /* $OpenBSD: x509.h,v 1.55 2018/05/18 18:02:07 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 | * |
@@ -1106,9 +1106,9 @@ X509_NAME_ENTRY *X509_NAME_delete_entry(X509_NAME *name, int loc); | |||
1106 | int X509_NAME_add_entry(X509_NAME *name, const X509_NAME_ENTRY *ne, | 1106 | int X509_NAME_add_entry(X509_NAME *name, const X509_NAME_ENTRY *ne, |
1107 | int loc, int set); | 1107 | int loc, int set); |
1108 | int X509_NAME_add_entry_by_OBJ(X509_NAME *name, ASN1_OBJECT *obj, int type, | 1108 | int X509_NAME_add_entry_by_OBJ(X509_NAME *name, ASN1_OBJECT *obj, int type, |
1109 | unsigned char *bytes, int len, int loc, int set); | 1109 | const unsigned char *bytes, int len, int loc, int set); |
1110 | int X509_NAME_add_entry_by_NID(X509_NAME *name, int nid, int type, | 1110 | int X509_NAME_add_entry_by_NID(X509_NAME *name, int nid, int type, |
1111 | unsigned char *bytes, int len, int loc, int set); | 1111 | const unsigned char *bytes, int len, int loc, int set); |
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, |
diff --git a/src/lib/libcrypto/x509/x509name.c b/src/lib/libcrypto/x509/x509name.c index fc804f5428..0c93213352 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.20 2018/05/18 17:59:16 tb Exp $ */ | 1 | /* $OpenBSD: x509name.c,v 1.21 2018/05/18 18:02:07 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 | * |
@@ -189,7 +189,7 @@ X509_NAME_delete_entry(X509_NAME *name, int loc) | |||
189 | 189 | ||
190 | int | 190 | int |
191 | X509_NAME_add_entry_by_OBJ(X509_NAME *name, ASN1_OBJECT *obj, int type, | 191 | X509_NAME_add_entry_by_OBJ(X509_NAME *name, ASN1_OBJECT *obj, int type, |
192 | unsigned char *bytes, int len, int loc, int set) | 192 | const unsigned char *bytes, int len, int loc, int set) |
193 | { | 193 | { |
194 | X509_NAME_ENTRY *ne; | 194 | X509_NAME_ENTRY *ne; |
195 | int ret; | 195 | int ret; |
@@ -204,7 +204,7 @@ X509_NAME_add_entry_by_OBJ(X509_NAME *name, ASN1_OBJECT *obj, int type, | |||
204 | 204 | ||
205 | int | 205 | int |
206 | X509_NAME_add_entry_by_NID(X509_NAME *name, int nid, int type, | 206 | X509_NAME_add_entry_by_NID(X509_NAME *name, int nid, int type, |
207 | unsigned char *bytes, int len, int loc, int set) | 207 | const unsigned char *bytes, int len, int loc, int set) |
208 | { | 208 | { |
209 | X509_NAME_ENTRY *ne; | 209 | X509_NAME_ENTRY *ne; |
210 | int ret; | 210 | int ret; |