summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/asn1/d2i_pu.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/asn1/d2i_pu.c')
-rw-r--r--src/lib/libcrypto/asn1/d2i_pu.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/libcrypto/asn1/d2i_pu.c b/src/lib/libcrypto/asn1/d2i_pu.c
index e917356254..3750265e7f 100644
--- a/src/lib/libcrypto/asn1/d2i_pu.c
+++ b/src/lib/libcrypto/asn1/d2i_pu.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: d2i_pu.c,v 1.13 2015/03/19 14:00:22 tedu Exp $ */ 1/* $OpenBSD: d2i_pu.c,v 1.14 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 *
@@ -83,14 +83,14 @@ d2i_PublicKey(int type, EVP_PKEY **a, const unsigned char **pp, long length)
83 83
84 if ((a == NULL) || (*a == NULL)) { 84 if ((a == NULL) || (*a == NULL)) {
85 if ((ret = EVP_PKEY_new()) == NULL) { 85 if ((ret = EVP_PKEY_new()) == NULL) {
86 ASN1err(ASN1_F_D2I_PUBLICKEY, ERR_R_EVP_LIB); 86 ASN1error(ERR_R_EVP_LIB);
87 return (NULL); 87 return (NULL);
88 } 88 }
89 } else 89 } else
90 ret = *a; 90 ret = *a;
91 91
92 if (!EVP_PKEY_set_type(ret, type)) { 92 if (!EVP_PKEY_set_type(ret, type)) {
93 ASN1err(ASN1_F_D2I_PUBLICKEY, ERR_R_EVP_LIB); 93 ASN1error(ERR_R_EVP_LIB);
94 goto err; 94 goto err;
95 } 95 }
96 96
@@ -99,7 +99,7 @@ d2i_PublicKey(int type, EVP_PKEY **a, const unsigned char **pp, long length)
99 case EVP_PKEY_RSA: 99 case EVP_PKEY_RSA:
100 if ((ret->pkey.rsa = d2i_RSAPublicKey(NULL, pp, length)) == 100 if ((ret->pkey.rsa = d2i_RSAPublicKey(NULL, pp, length)) ==
101 NULL) { 101 NULL) {
102 ASN1err(ASN1_F_D2I_PUBLICKEY, ERR_R_ASN1_LIB); 102 ASN1error(ERR_R_ASN1_LIB);
103 goto err; 103 goto err;
104 } 104 }
105 break; 105 break;
@@ -107,7 +107,7 @@ d2i_PublicKey(int type, EVP_PKEY **a, const unsigned char **pp, long length)
107#ifndef OPENSSL_NO_DSA 107#ifndef OPENSSL_NO_DSA
108 case EVP_PKEY_DSA: 108 case EVP_PKEY_DSA:
109 if (!d2i_DSAPublicKey(&(ret->pkey.dsa), pp, length)) { 109 if (!d2i_DSAPublicKey(&(ret->pkey.dsa), pp, length)) {
110 ASN1err(ASN1_F_D2I_PUBLICKEY, ERR_R_ASN1_LIB); 110 ASN1error(ERR_R_ASN1_LIB);
111 goto err; 111 goto err;
112 } 112 }
113 break; 113 break;
@@ -115,13 +115,13 @@ d2i_PublicKey(int type, EVP_PKEY **a, const unsigned char **pp, long length)
115#ifndef OPENSSL_NO_EC 115#ifndef OPENSSL_NO_EC
116 case EVP_PKEY_EC: 116 case EVP_PKEY_EC:
117 if (!o2i_ECPublicKey(&(ret->pkey.ec), pp, length)) { 117 if (!o2i_ECPublicKey(&(ret->pkey.ec), pp, length)) {
118 ASN1err(ASN1_F_D2I_PUBLICKEY, ERR_R_ASN1_LIB); 118 ASN1error(ERR_R_ASN1_LIB);
119 goto err; 119 goto err;
120 } 120 }
121 break; 121 break;
122#endif 122#endif
123 default: 123 default:
124 ASN1err(ASN1_F_D2I_PUBLICKEY, ASN1_R_UNKNOWN_PUBLIC_KEY_TYPE); 124 ASN1error(ASN1_R_UNKNOWN_PUBLIC_KEY_TYPE);
125 goto err; 125 goto err;
126 /* break; */ 126 /* break; */
127 } 127 }