diff options
author | tb <> | 2018-05-18 17:59:16 +0000 |
---|---|---|
committer | tb <> | 2018-05-18 17:59:16 +0000 |
commit | ed50d2df6e31a2b7e21685507224930405da7aa9 (patch) | |
tree | dda47b18b95071feec237614d83aec3971853ff6 /src/lib/libcrypto/x509/x509name.c | |
parent | 4add99b8c6cbd8e11583f180cb4ed618f9929a25 (diff) | |
download | openbsd-ed50d2df6e31a2b7e21685507224930405da7aa9.tar.gz openbsd-ed50d2df6e31a2b7e21685507224930405da7aa9.tar.bz2 openbsd-ed50d2df6e31a2b7e21685507224930405da7aa9.zip |
Add a const qualifier to the 'X509_NAME_ENTRY *ne' argument of
X509_NAME_add_entry(3).
tested in a bulk build by sthen,
ok jsing
Diffstat (limited to 'src/lib/libcrypto/x509/x509name.c')
-rw-r--r-- | src/lib/libcrypto/x509/x509name.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/lib/libcrypto/x509/x509name.c b/src/lib/libcrypto/x509/x509name.c index 9ff2a907b4..fc804f5428 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.19 2018/05/18 17:56:12 tb Exp $ */ | 1 | /* $OpenBSD: x509name.c,v 1.20 2018/05/18 17:59:16 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 | * |
@@ -235,7 +235,8 @@ X509_NAME_add_entry_by_txt(X509_NAME *name, const char *field, int type, | |||
235 | /* if set is -1, append to previous set, 0 'a new one', and 1, | 235 | /* if set is -1, append to previous set, 0 'a new one', and 1, |
236 | * prepend to the guy we are about to stomp on. */ | 236 | * prepend to the guy we are about to stomp on. */ |
237 | int | 237 | int |
238 | X509_NAME_add_entry(X509_NAME *name, X509_NAME_ENTRY *ne, int loc, int set) | 238 | X509_NAME_add_entry(X509_NAME *name, const X509_NAME_ENTRY *ne, int loc, |
239 | int set) | ||
239 | { | 240 | { |
240 | X509_NAME_ENTRY *new_name = NULL; | 241 | X509_NAME_ENTRY *new_name = NULL; |
241 | int n, i, inc; | 242 | int n, i, inc; |
@@ -268,7 +269,8 @@ X509_NAME_add_entry(X509_NAME *name, X509_NAME_ENTRY *ne, int loc, int set) | |||
268 | set = sk_X509_NAME_ENTRY_value(sk, loc)->set; | 269 | set = sk_X509_NAME_ENTRY_value(sk, loc)->set; |
269 | } | 270 | } |
270 | 271 | ||
271 | if ((new_name = X509_NAME_ENTRY_dup(ne)) == NULL) | 272 | /* OpenSSL has ASN1-generated X509_NAME_ENTRY_dup() without const. */ |
273 | if ((new_name = X509_NAME_ENTRY_dup((X509_NAME_ENTRY *)ne)) == NULL) | ||
272 | goto err; | 274 | goto err; |
273 | new_name->set = set; | 275 | new_name->set = set; |
274 | if (!sk_X509_NAME_ENTRY_insert(sk, new_name, loc)) { | 276 | if (!sk_X509_NAME_ENTRY_insert(sk, new_name, loc)) { |