[pkg-opensc-commit] [libp11] 03/06: LibreSSL fix and EC/RSA unification

Eric Dorland eric at moszumanska.debian.org
Mon May 22 03:43:02 UTC 2017


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

eric pushed a commit to annotated tag libp11-0.4.6
in repository libp11.

commit dc33d662d985ed90fa4606cdedae215175feca08
Author: Michał Trojnara <Michal.Trojnara at stunnel.org>
Date:   Thu Apr 6 07:33:19 2017 +0200

    LibreSSL fix and EC/RSA unification
---
 src/p11_ec.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/src/p11_ec.c b/src/p11_ec.c
index 754da9a..2d9c28a 100644
--- a/src/p11_ec.c
+++ b/src/p11_ec.c
@@ -242,7 +242,7 @@ static EC_KEY *pkcs11_get_ec(PKCS11_KEY *key)
 
 static void pkcs11_set_ex_data_ec(EC_KEY* ec, PKCS11_KEY* key)
 {
-#if OPENSSL_VERSION_NUMBER >= 0x10100000L
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
 	EC_KEY_set_ex_data(ec, ec_ex_index, key);
 #else
 	ECDSA_set_ex_data(ec, ec_ex_index, key);
@@ -297,11 +297,7 @@ static EVP_PKEY *pkcs11_get_evp_key_ec(PKCS11_KEY *key)
 	/* TODO: Retrieve the ECDSA private key object attributes instead,
 	 * unless the key has the "sensitive" attribute set */
 
-#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
-	EC_KEY_set_ex_data(ec, ec_ex_index, key);
-#else
-	ECDSA_set_ex_data(ec, ec_ex_index, key);
-#endif
+	pkcs11_set_ex_data_ec(ec, key);
 	EC_KEY_free(ec); /* Drops our reference to it */
 	return pk;
 }

-- 
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