summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormiod <>2014-07-11 14:16:10 +0000
committermiod <>2014-07-11 14:16:10 +0000
commit439032eec8b1ed80ee0d0110896b7f9455427bb3 (patch)
treefb42e4bf37385ceee9daac66eda25a4df2db3e98
parent5fa0dbe7b60841499f77234079dfe27b426f4f6d (diff)
downloadopenbsd-439032eec8b1ed80ee0d0110896b7f9455427bb3.tar.gz
openbsd-439032eec8b1ed80ee0d0110896b7f9455427bb3.tar.bz2
openbsd-439032eec8b1ed80ee0d0110896b7f9455427bb3.zip
In EVP_PBE_alg_add don't use the underlying NID for the cipher
as it may have a non-standard key size; OpenSSL PR #3206 via OpenSSL trunk.
-rw-r--r--src/lib/libcrypto/evp/evp_pbe.c4
-rw-r--r--src/lib/libssl/src/crypto/evp/evp_pbe.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/libcrypto/evp/evp_pbe.c b/src/lib/libcrypto/evp/evp_pbe.c
index 42ec6e0dda..fcfc43d578 100644
--- a/src/lib/libcrypto/evp/evp_pbe.c
+++ b/src/lib/libcrypto/evp/evp_pbe.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: evp_pbe.c,v 1.20 2014/07/11 08:44:48 jsing Exp $ */ 1/* $OpenBSD: evp_pbe.c,v 1.21 2014/07/11 14:16:10 miod 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 1999. 3 * project 1999.
4 */ 4 */
@@ -226,7 +226,7 @@ EVP_PBE_alg_add(int nid, const EVP_CIPHER *cipher, const EVP_MD *md,
226 int cipher_nid, md_nid; 226 int cipher_nid, md_nid;
227 227
228 if (cipher) 228 if (cipher)
229 cipher_nid = EVP_CIPHER_type(cipher); 229 cipher_nid = EVP_CIPHER_nid(cipher);
230 else 230 else
231 cipher_nid = -1; 231 cipher_nid = -1;
232 if (md) 232 if (md)
diff --git a/src/lib/libssl/src/crypto/evp/evp_pbe.c b/src/lib/libssl/src/crypto/evp/evp_pbe.c
index 42ec6e0dda..fcfc43d578 100644
--- a/src/lib/libssl/src/crypto/evp/evp_pbe.c
+++ b/src/lib/libssl/src/crypto/evp/evp_pbe.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: evp_pbe.c,v 1.20 2014/07/11 08:44:48 jsing Exp $ */ 1/* $OpenBSD: evp_pbe.c,v 1.21 2014/07/11 14:16:10 miod 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 1999. 3 * project 1999.
4 */ 4 */
@@ -226,7 +226,7 @@ EVP_PBE_alg_add(int nid, const EVP_CIPHER *cipher, const EVP_MD *md,
226 int cipher_nid, md_nid; 226 int cipher_nid, md_nid;
227 227
228 if (cipher) 228 if (cipher)
229 cipher_nid = EVP_CIPHER_type(cipher); 229 cipher_nid = EVP_CIPHER_nid(cipher);
230 else 230 else
231 cipher_nid = -1; 231 cipher_nid = -1;
232 if (md) 232 if (md)