[pkg-opensc-commit] [engine-pkcs11] 105/152: ECDSA Support

Eric Dorland eric at moszumanska.debian.org
Mon Oct 19 03:11:21 UTC 2015


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

eric pushed a commit to branch master
in repository engine-pkcs11.

commit 49273275c2642dfced9c5d88a2b9608471d28e2e
Author: Doug Engert <deengert at anl.gov>
Date:   Thu Sep 19 14:39:08 2013 -0500

    ECDSA Support
    
    Add support to use ECDSA support from libp11.
---
 src/hw_pkcs11.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/src/hw_pkcs11.c b/src/hw_pkcs11.c
index 24806ff..3b538ae 100644
--- a/src/hw_pkcs11.c
+++ b/src/hw_pkcs11.c
@@ -62,6 +62,8 @@
 #include <config.h>
 #include <stdio.h>
 #include <string.h>
+#include <openssl/opensslv.h>
+#include <openssl/opensslconf.h>
 #include <openssl/crypto.h>
 #include <openssl/objects.h>
 #include <openssl/engine.h>
@@ -126,6 +128,13 @@ static const ENGINE_CMD_DEFN pkcs11_cmd_defns[] = {
 /* Destructor */
 static int pkcs11_engine_destroy(ENGINE * e)
 {
+	
+#ifndef OPENSSL_NO_EC
+#ifndef OPENSSL_NO_ECDSA
+	PKCS11_ecdsa_method_free();
+#endif
+#endif
+
 	return 1;
 }
 
@@ -188,6 +197,14 @@ static int bind_helper(ENGINE * e)
 #ifndef OPENSSL_NO_DH
 	    !ENGINE_set_DH(e, DH_get_default_method()) ||
 #endif
+#ifndef OPENSSL_NO_EC
+#ifndef OPENSSL_NO_ECDSA
+		!ENGINE_set_ECDSA(e, PKCS11_get_ecdsa_method()) ||
+#endif 
+/* TODO add ECDH 
+		!ENGINE_set_ECDH(e, PKCS11_get_ecdh_method()) ||
+*/
+#endif
 	    !ENGINE_set_RAND(e, RAND_SSLeay()) ||
 #if 0
 	    !ENGINE_set_BN_mod_exp(e, BN_mod_exp) ||

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



More information about the pkg-opensc-commit mailing list