diff options
author | beck <> | 2017-01-29 17:49:23 +0000 |
---|---|---|
committer | beck <> | 2017-01-29 17:49:23 +0000 |
commit | 957b11334a7afb14537322f0e4795b2e368b3f59 (patch) | |
tree | 1a54abba678898ee5270ae4f3404a50ee9a92eea /src/lib/libcrypto/pem/pem_seal.c | |
parent | df96e020e729c6c37a8c7fe311fdd1fe6a8718c5 (diff) | |
download | openbsd-957b11334a7afb14537322f0e4795b2e368b3f59.tar.gz openbsd-957b11334a7afb14537322f0e4795b2e368b3f59.tar.bz2 openbsd-957b11334a7afb14537322f0e4795b2e368b3f59.zip |
Send the function codes from the error functions to the bit bucket,
as was done earlier in libssl. Thanks inoguchi@ for noticing
libssl had more reacharounds into this.
ok jsing@ inoguchi@
Diffstat (limited to 'src/lib/libcrypto/pem/pem_seal.c')
-rw-r--r-- | src/lib/libcrypto/pem/pem_seal.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/libcrypto/pem/pem_seal.c b/src/lib/libcrypto/pem/pem_seal.c index 79162b32d7..c6d61fff0f 100644 --- a/src/lib/libcrypto/pem/pem_seal.c +++ b/src/lib/libcrypto/pem/pem_seal.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: pem_seal.c,v 1.23 2016/11/05 11:32:45 miod Exp $ */ | 1 | /* $OpenBSD: pem_seal.c,v 1.24 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 | * |
@@ -97,7 +97,7 @@ PEM_SealInit(PEM_ENCODE_SEAL_CTX *ctx, EVP_CIPHER *type, EVP_MD *md_type, | |||
97 | 97 | ||
98 | for (i = 0; i < npubk; i++) { | 98 | for (i = 0; i < npubk; i++) { |
99 | if (pubk[i]->type != EVP_PKEY_RSA) { | 99 | if (pubk[i]->type != EVP_PKEY_RSA) { |
100 | PEMerr(PEM_F_PEM_SEALINIT, PEM_R_PUBLIC_KEY_NO_RSA); | 100 | PEMerror(PEM_R_PUBLIC_KEY_NO_RSA); |
101 | goto err; | 101 | goto err; |
102 | } | 102 | } |
103 | j = RSA_size(pubk[i]->pkey.rsa); | 103 | j = RSA_size(pubk[i]->pkey.rsa); |
@@ -106,7 +106,7 @@ PEM_SealInit(PEM_ENCODE_SEAL_CTX *ctx, EVP_CIPHER *type, EVP_MD *md_type, | |||
106 | } | 106 | } |
107 | s = reallocarray(NULL, max, 2); | 107 | s = reallocarray(NULL, max, 2); |
108 | if (s == NULL) { | 108 | if (s == NULL) { |
109 | PEMerr(PEM_F_PEM_SEALINIT, ERR_R_MALLOC_FAILURE); | 109 | PEMerror(ERR_R_MALLOC_FAILURE); |
110 | goto err; | 110 | goto err; |
111 | } | 111 | } |
112 | 112 | ||
@@ -170,7 +170,7 @@ PEM_SealFinal(PEM_ENCODE_SEAL_CTX *ctx, unsigned char *sig, int *sigl, | |||
170 | unsigned int i; | 170 | unsigned int i; |
171 | 171 | ||
172 | if (priv->type != EVP_PKEY_RSA) { | 172 | if (priv->type != EVP_PKEY_RSA) { |
173 | PEMerr(PEM_F_PEM_SEALFINAL, PEM_R_PUBLIC_KEY_NO_RSA); | 173 | PEMerror(PEM_R_PUBLIC_KEY_NO_RSA); |
174 | goto err; | 174 | goto err; |
175 | } | 175 | } |
176 | i = RSA_size(priv->pkey.rsa); | 176 | i = RSA_size(priv->pkey.rsa); |
@@ -178,7 +178,7 @@ PEM_SealFinal(PEM_ENCODE_SEAL_CTX *ctx, unsigned char *sig, int *sigl, | |||
178 | i = 100; | 178 | i = 100; |
179 | s = reallocarray(NULL, i, 2); | 179 | s = reallocarray(NULL, i, 2); |
180 | if (s == NULL) { | 180 | if (s == NULL) { |
181 | PEMerr(PEM_F_PEM_SEALFINAL, ERR_R_MALLOC_FAILURE); | 181 | PEMerror(ERR_R_MALLOC_FAILURE); |
182 | goto err; | 182 | goto err; |
183 | } | 183 | } |
184 | 184 | ||