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/dh/dh_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/dh/dh_pmeth.c')
| -rw-r--r-- | src/lib/libcrypto/dh/dh_pmeth.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libcrypto/dh/dh_pmeth.c b/src/lib/libcrypto/dh/dh_pmeth.c index 6d750eb30d..24d16ff5d3 100644 --- a/src/lib/libcrypto/dh/dh_pmeth.c +++ b/src/lib/libcrypto/dh/dh_pmeth.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: dh_pmeth.c,v 1.9 2014/07/11 08:44:48 jsing Exp $ */ | 1 | /* $OpenBSD: dh_pmeth.c,v 1.10 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 | */ |
| @@ -215,7 +215,7 @@ pkey_dh_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey) | |||
| 215 | DH *dh = NULL; | 215 | DH *dh = NULL; |
| 216 | 216 | ||
| 217 | if (ctx->pkey == NULL) { | 217 | if (ctx->pkey == NULL) { |
| 218 | DHerr(DH_F_PKEY_DH_KEYGEN, DH_R_NO_PARAMETERS_SET); | 218 | DHerror(DH_R_NO_PARAMETERS_SET); |
| 219 | return 0; | 219 | return 0; |
| 220 | } | 220 | } |
| 221 | dh = DH_new(); | 221 | dh = DH_new(); |
| @@ -234,7 +234,7 @@ pkey_dh_derive(EVP_PKEY_CTX *ctx, unsigned char *key, size_t *keylen) | |||
| 234 | int ret; | 234 | int ret; |
| 235 | 235 | ||
| 236 | if (!ctx->pkey || !ctx->peerkey) { | 236 | if (!ctx->pkey || !ctx->peerkey) { |
| 237 | DHerr(DH_F_PKEY_DH_DERIVE, DH_R_KEYS_NOT_SET); | 237 | DHerror(DH_R_KEYS_NOT_SET); |
| 238 | return 0; | 238 | return 0; |
| 239 | } | 239 | } |
| 240 | ret = DH_compute_key(key, ctx->peerkey->pkey.dh->pub_key, | 240 | ret = DH_compute_key(key, ctx->peerkey->pkey.dh->pub_key, |
