summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/x509/x509name.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/x509/x509name.c')
-rw-r--r--src/lib/libcrypto/x509/x509name.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/lib/libcrypto/x509/x509name.c b/src/lib/libcrypto/x509/x509name.c
index 14634013cf..ef242ce0a5 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.13 2014/09/29 04:17:24 miod Exp $ */ 1/* $OpenBSD: x509name.c,v 1.14 2017/01/29 17:49:23 beck 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 *
@@ -275,7 +275,7 @@ X509_NAME_add_entry(X509_NAME *name, X509_NAME_ENTRY *ne, int loc, int set)
275 goto err; 275 goto err;
276 new_name->set = set; 276 new_name->set = set;
277 if (!sk_X509_NAME_ENTRY_insert(sk, new_name, loc)) { 277 if (!sk_X509_NAME_ENTRY_insert(sk, new_name, loc)) {
278 X509err(X509_F_X509_NAME_ADD_ENTRY, ERR_R_MALLOC_FAILURE); 278 X509error(ERR_R_MALLOC_FAILURE);
279 goto err; 279 goto err;
280 } 280 }
281 if (inc) { 281 if (inc) {
@@ -300,8 +300,7 @@ X509_NAME_ENTRY_create_by_txt(X509_NAME_ENTRY **ne,
300 300
301 obj = OBJ_txt2obj(field, 0); 301 obj = OBJ_txt2obj(field, 0);
302 if (obj == NULL) { 302 if (obj == NULL) {
303 X509err(X509_F_X509_NAME_ENTRY_CREATE_BY_TXT, 303 X509error(X509_R_INVALID_FIELD_NAME);
304 X509_R_INVALID_FIELD_NAME);
305 ERR_asprintf_error_data("name=%s", field); 304 ERR_asprintf_error_data("name=%s", field);
306 return (NULL); 305 return (NULL);
307 } 306 }
@@ -319,8 +318,7 @@ X509_NAME_ENTRY_create_by_NID(X509_NAME_ENTRY **ne, int nid, int type,
319 318
320 obj = OBJ_nid2obj(nid); 319 obj = OBJ_nid2obj(nid);
321 if (obj == NULL) { 320 if (obj == NULL) {
322 X509err(X509_F_X509_NAME_ENTRY_CREATE_BY_NID, 321 X509error(X509_R_UNKNOWN_NID);
323 X509_R_UNKNOWN_NID);
324 return (NULL); 322 return (NULL);
325 } 323 }
326 nentry = X509_NAME_ENTRY_create_by_OBJ(ne, obj, type, bytes, len); 324 nentry = X509_NAME_ENTRY_create_by_OBJ(ne, obj, type, bytes, len);
@@ -359,8 +357,7 @@ int
359X509_NAME_ENTRY_set_object(X509_NAME_ENTRY *ne, ASN1_OBJECT *obj) 357X509_NAME_ENTRY_set_object(X509_NAME_ENTRY *ne, ASN1_OBJECT *obj)
360{ 358{
361 if ((ne == NULL) || (obj == NULL)) { 359 if ((ne == NULL) || (obj == NULL)) {
362 X509err(X509_F_X509_NAME_ENTRY_SET_OBJECT, 360 X509error(ERR_R_PASSED_NULL_PARAMETER);
363 ERR_R_PASSED_NULL_PARAMETER);
364 return (0); 361 return (0);
365 } 362 }
366 ASN1_OBJECT_free(ne->object); 363 ASN1_OBJECT_free(ne->object);