summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/asn1/d2i_pr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/asn1/d2i_pr.c')
-rw-r--r--src/lib/libcrypto/asn1/d2i_pr.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/lib/libcrypto/asn1/d2i_pr.c b/src/lib/libcrypto/asn1/d2i_pr.c
index 68d02177c4..7a5880a8cd 100644
--- a/src/lib/libcrypto/asn1/d2i_pr.c
+++ b/src/lib/libcrypto/asn1/d2i_pr.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: d2i_pr.c,v 1.14 2015/03/19 14:00:22 tedu Exp $ */ 1/* $OpenBSD: d2i_pr.c,v 1.15 2017/01/29 17:49:22 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 *
@@ -80,7 +80,7 @@ d2i_PrivateKey(int type, EVP_PKEY **a, const unsigned char **pp, long length)
80 80
81 if ((a == NULL) || (*a == NULL)) { 81 if ((a == NULL) || (*a == NULL)) {
82 if ((ret = EVP_PKEY_new()) == NULL) { 82 if ((ret = EVP_PKEY_new()) == NULL) {
83 ASN1err(ASN1_F_D2I_PRIVATEKEY, ERR_R_EVP_LIB); 83 ASN1error(ERR_R_EVP_LIB);
84 return (NULL); 84 return (NULL);
85 } 85 }
86 } else { 86 } else {
@@ -94,7 +94,7 @@ d2i_PrivateKey(int type, EVP_PKEY **a, const unsigned char **pp, long length)
94 } 94 }
95 95
96 if (!EVP_PKEY_set_type(ret, type)) { 96 if (!EVP_PKEY_set_type(ret, type)) {
97 ASN1err(ASN1_F_D2I_PRIVATEKEY, ASN1_R_UNKNOWN_PUBLIC_KEY_TYPE); 97 ASN1error(ASN1_R_UNKNOWN_PUBLIC_KEY_TYPE);
98 goto err; 98 goto err;
99 } 99 }
100 100
@@ -109,7 +109,7 @@ d2i_PrivateKey(int type, EVP_PKEY **a, const unsigned char **pp, long length)
109 ret = EVP_PKCS82PKEY(p8); 109 ret = EVP_PKCS82PKEY(p8);
110 PKCS8_PRIV_KEY_INFO_free(p8); 110 PKCS8_PRIV_KEY_INFO_free(p8);
111 } else { 111 } else {
112 ASN1err(ASN1_F_D2I_PRIVATEKEY, ERR_R_ASN1_LIB); 112 ASN1error(ERR_R_ASN1_LIB);
113 goto err; 113 goto err;
114 } 114 }
115 } 115 }
@@ -153,8 +153,7 @@ d2i_AutoPrivateKey(EVP_PKEY **a, const unsigned char **pp, long length)
153 153
154 sk_ASN1_TYPE_pop_free(inkey, ASN1_TYPE_free); 154 sk_ASN1_TYPE_pop_free(inkey, ASN1_TYPE_free);
155 if (!p8) { 155 if (!p8) {
156 ASN1err(ASN1_F_D2I_AUTOPRIVATEKEY, 156 ASN1error(ASN1_R_UNSUPPORTED_PUBLIC_KEY_TYPE);
157 ASN1_R_UNSUPPORTED_PUBLIC_KEY_TYPE);
158 return NULL; 157 return NULL;
159 } 158 }
160 ret = EVP_PKCS82PKEY(p8); 159 ret = EVP_PKCS82PKEY(p8);