[pkg-opensc-commit] [libp11] 40/51: Revert "Do not set default RSA and EC methods"

Eric Dorland eric at moszumanska.debian.org
Wed Dec 7 17:51:33 UTC 2016


This is an automated email from the git hooks/post-receive script.

eric pushed a commit to branch master
in repository libp11.

commit b9d63196e9899fba4236c6829a5735f1d1414052
Author: Michał Trojnara <Michal.Trojnara at stunnel.org>
Date:   Thu Dec 1 21:41:41 2016 +0100

    Revert "Do not set default RSA and EC methods"
    
    Alien ECDSA keys are now gracefully handled, so we may safely
    revert the temporary workaround implemented in commit
    b9b7941765b7d6cd4c0d003b53b9d44801179ebe.
    
    This reverts commit b9b7941765b7d6cd4c0d003b53b9d44801179ebe.
---
 src/eng_front.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/src/eng_front.c b/src/eng_front.c
index 17c6140..d03fa39 100644
--- a/src/eng_front.c
+++ b/src/eng_front.c
@@ -213,6 +213,19 @@ static int bind_helper(ENGINE *e)
 #ifndef OPENSSL_NO_RSA
 			!ENGINE_set_RSA(e, PKCS11_get_rsa_method()) ||
 #endif
+#if OPENSSL_VERSION_NUMBER  >= 0x10100002L
+#ifndef OPENSSL_NO_EC
+			/* PKCS11_get_ec_key_method combines ECDSA and ECDH */
+			!ENGINE_set_EC(e, PKCS11_get_ec_key_method()) ||
+#endif /* OPENSSL_NO_EC */
+#else /* OPENSSL_VERSION_NUMBER */
+#ifndef OPENSSL_NO_ECDSA
+			!ENGINE_set_ECDSA(e, PKCS11_get_ecdsa_method()) ||
+#endif
+#ifndef OPENSSL_NO_ECDH
+			!ENGINE_set_ECDH(e, PKCS11_get_ecdh_method()) ||
+#endif
+#endif /* OPENSSL_VERSION_NUMBER */
 			!ENGINE_set_load_pubkey_function(e, load_pubkey) ||
 			!ENGINE_set_load_privkey_function(e, load_privkey)) {
 		return 0;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opensc/libp11.git



More information about the pkg-opensc-commit mailing list