diff options
author | miod <> | 2014-11-18 05:27:05 +0000 |
---|---|---|
committer | miod <> | 2014-11-18 05:27:05 +0000 |
commit | d3f6d8aa023c54de8a140fc3586b8e318276e6b2 (patch) | |
tree | 412dc54ce77577b44b7d4dcac13dd600ecc40f11 /src/lib | |
parent | 8e184a24232ac494ffc7ec0d41b050fd39b7645d (diff) | |
download | openbsd-d3f6d8aa023c54de8a140fc3586b8e318276e6b2.tar.gz openbsd-d3f6d8aa023c54de8a140fc3586b8e318276e6b2.tar.bz2 openbsd-d3f6d8aa023c54de8a140fc3586b8e318276e6b2.zip |
Return success in param_copy_gost01() if there is no private key to copy;
broken in r1.3.
Spotted by Dmitry Eremin-Solenikov
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libcrypto/gost/gostr341001_ameth.c | 4 | ||||
-rw-r--r-- | src/lib/libssl/src/crypto/gost/gostr341001_ameth.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/libcrypto/gost/gostr341001_ameth.c b/src/lib/libcrypto/gost/gostr341001_ameth.c index 243a7490fa..bf55190d5d 100644 --- a/src/lib/libcrypto/gost/gostr341001_ameth.c +++ b/src/lib/libcrypto/gost/gostr341001_ameth.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: gostr341001_ameth.c,v 1.3 2014/11/13 20:29:55 miod Exp $ */ | 1 | /* $OpenBSD: gostr341001_ameth.c,v 1.4 2014/11/18 05:27:05 miod Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2014 Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | 3 | * Copyright (c) 2014 Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> |
4 | * Copyright (c) 2005-2006 Cryptocom LTD | 4 | * Copyright (c) 2005-2006 Cryptocom LTD |
@@ -593,7 +593,7 @@ param_copy_gost01(EVP_PKEY *to, const EVP_PKEY *from) | |||
593 | { | 593 | { |
594 | GOST_KEY *eto = to->pkey.gost; | 594 | GOST_KEY *eto = to->pkey.gost; |
595 | const GOST_KEY *efrom = from->pkey.gost; | 595 | const GOST_KEY *efrom = from->pkey.gost; |
596 | int ret = 0; | 596 | int ret = 1; |
597 | 597 | ||
598 | if (EVP_PKEY_base_id(from) != EVP_PKEY_base_id(to)) { | 598 | if (EVP_PKEY_base_id(from) != EVP_PKEY_base_id(to)) { |
599 | GOSTerr(GOST_F_PARAM_COPY_GOST01, | 599 | GOSTerr(GOST_F_PARAM_COPY_GOST01, |
diff --git a/src/lib/libssl/src/crypto/gost/gostr341001_ameth.c b/src/lib/libssl/src/crypto/gost/gostr341001_ameth.c index 243a7490fa..bf55190d5d 100644 --- a/src/lib/libssl/src/crypto/gost/gostr341001_ameth.c +++ b/src/lib/libssl/src/crypto/gost/gostr341001_ameth.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: gostr341001_ameth.c,v 1.3 2014/11/13 20:29:55 miod Exp $ */ | 1 | /* $OpenBSD: gostr341001_ameth.c,v 1.4 2014/11/18 05:27:05 miod Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2014 Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | 3 | * Copyright (c) 2014 Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> |
4 | * Copyright (c) 2005-2006 Cryptocom LTD | 4 | * Copyright (c) 2005-2006 Cryptocom LTD |
@@ -593,7 +593,7 @@ param_copy_gost01(EVP_PKEY *to, const EVP_PKEY *from) | |||
593 | { | 593 | { |
594 | GOST_KEY *eto = to->pkey.gost; | 594 | GOST_KEY *eto = to->pkey.gost; |
595 | const GOST_KEY *efrom = from->pkey.gost; | 595 | const GOST_KEY *efrom = from->pkey.gost; |
596 | int ret = 0; | 596 | int ret = 1; |
597 | 597 | ||
598 | if (EVP_PKEY_base_id(from) != EVP_PKEY_base_id(to)) { | 598 | if (EVP_PKEY_base_id(from) != EVP_PKEY_base_id(to)) { |
599 | GOSTerr(GOST_F_PARAM_COPY_GOST01, | 599 | GOSTerr(GOST_F_PARAM_COPY_GOST01, |