diff options
| author | beck <> | 2017-01-29 17:49:23 +0000 |
|---|---|---|
| committer | beck <> | 2017-01-29 17:49:23 +0000 |
| commit | d1f47bd292f36094480caa49ada36b99a69c59b0 (patch) | |
| tree | 1a54abba678898ee5270ae4f3404a50ee9a92eea /src/lib/libcrypto/dsa/dsa_pmeth.c | |
| parent | f8c627888330b75c2eea8a3c27d0efe947a4f9da (diff) | |
| download | openbsd-d1f47bd292f36094480caa49ada36b99a69c59b0.tar.gz openbsd-d1f47bd292f36094480caa49ada36b99a69c59b0.tar.bz2 openbsd-d1f47bd292f36094480caa49ada36b99a69c59b0.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/dsa/dsa_pmeth.c')
| -rw-r--r-- | src/lib/libcrypto/dsa/dsa_pmeth.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/lib/libcrypto/dsa/dsa_pmeth.c b/src/lib/libcrypto/dsa/dsa_pmeth.c index c7a2edfc94..780b070a72 100644 --- a/src/lib/libcrypto/dsa/dsa_pmeth.c +++ b/src/lib/libcrypto/dsa/dsa_pmeth.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: dsa_pmeth.c,v 1.10 2014/07/11 08:44:48 jsing Exp $ */ | 1 | /* $OpenBSD: dsa_pmeth.c,v 1.11 2017/01/29 17:49:22 beck Exp $ */ |
| 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project 2006. | 3 | * project 2006. |
| 4 | */ | 4 | */ |
| @@ -191,7 +191,7 @@ pkey_dsa_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2) | |||
| 191 | case NID_sha256: | 191 | case NID_sha256: |
| 192 | break; | 192 | break; |
| 193 | default: | 193 | default: |
| 194 | DSAerr(DSA_F_PKEY_DSA_CTRL, DSA_R_INVALID_DIGEST_TYPE); | 194 | DSAerror(DSA_R_INVALID_DIGEST_TYPE); |
| 195 | return 0; | 195 | return 0; |
| 196 | } | 196 | } |
| 197 | dctx->md = p2; | 197 | dctx->md = p2; |
| @@ -208,7 +208,7 @@ pkey_dsa_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2) | |||
| 208 | case NID_sha512: | 208 | case NID_sha512: |
| 209 | break; | 209 | break; |
| 210 | default: | 210 | default: |
| 211 | DSAerr(DSA_F_PKEY_DSA_CTRL, DSA_R_INVALID_DIGEST_TYPE); | 211 | DSAerror(DSA_R_INVALID_DIGEST_TYPE); |
| 212 | return 0; | 212 | return 0; |
| 213 | } | 213 | } |
| 214 | dctx->md = p2; | 214 | dctx->md = p2; |
| @@ -220,8 +220,7 @@ pkey_dsa_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2) | |||
| 220 | return 1; | 220 | return 1; |
| 221 | 221 | ||
| 222 | case EVP_PKEY_CTRL_PEER_KEY: | 222 | case EVP_PKEY_CTRL_PEER_KEY: |
| 223 | DSAerr(DSA_F_PKEY_DSA_CTRL, | 223 | DSAerror(EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE); |
| 224 | EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE); | ||
| 225 | return -2; | 224 | return -2; |
| 226 | default: | 225 | default: |
| 227 | return -2; | 226 | return -2; |
| @@ -303,7 +302,7 @@ pkey_dsa_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey) | |||
| 303 | DSA *dsa = NULL; | 302 | DSA *dsa = NULL; |
| 304 | 303 | ||
| 305 | if (ctx->pkey == NULL) { | 304 | if (ctx->pkey == NULL) { |
| 306 | DSAerr(DSA_F_PKEY_DSA_KEYGEN, DSA_R_NO_PARAMETERS_SET); | 305 | DSAerror(DSA_R_NO_PARAMETERS_SET); |
| 307 | return 0; | 306 | return 0; |
| 308 | } | 307 | } |
| 309 | dsa = DSA_new(); | 308 | dsa = DSA_new(); |
