diff options
Diffstat (limited to '')
| -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)) { |
