[pkg-opensc-commit] [libp11] 66/86: Restored support for ANSI X9.31 RSA

Eric Dorland eric at moszumanska.debian.org
Sun Jul 24 21:40:24 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 76fac8b15d15e9371e71007b9f7d28d17ec4234e
Author: Michał Trojnara <Michal.Trojnara at stunnel.org>
Date:   Thu Mar 10 09:42:24 2016 +0100

    Restored support for ANSI X9.31 RSA
    
    OpenSSL uses this padding in crypto/rsa/rsa_pmeth.c.
    It is also trivial to implement, as it does not have a parameter.
---
 NEWS          | 2 ++
 src/p11_rsa.c | 3 +++
 2 files changed, 5 insertions(+)

diff --git a/NEWS b/NEWS
index ee7522f..60e8310 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,8 @@ New in 0.4.0; unreleased;
 * Added ECDH key derivation support (Doug Engert and Michał Trojnara)
 * Added support for RSA_NO_PADDING RSA private key decryption, used
   by OpenSSL for various features including OAEP (Michał Trojnara)
+* Added support for the ANSI X9.31 (RSA_X931_PADDING) RSA padding
+  (Michał Trojnara)
 * Fixed deadlocks in keys and certificates listing (Brian Hinz)
 * Use PKCS11_MODULE_PATH environment variable (Doug Engert)
 * Added support for building against OpenSSL 1.1.0-dev (Doug Engert)
diff --git a/src/p11_rsa.c b/src/p11_rsa.c
index f636b2e..8ac8489 100644
--- a/src/p11_rsa.c
+++ b/src/p11_rsa.c
@@ -63,6 +63,9 @@ static int pkcs11_mechanism(CK_MECHANISM *mechanism, const int padding)
 	case RSA_NO_PADDING:
 		mechanism->mechanism = CKM_RSA_X_509;
 		break;
+	case RSA_X931_PADDING:
+		mechanism->mechanism = CKM_RSA_X9_31;
+		break;
 	default:
 		printf("pkcs11 engine: unsupported padding type\n");
 		return -1;

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