summaryrefslogtreecommitdiff
path: root/lib/x509/pkcs7.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2017-07-21 23:56:20 +0200
committerNikos Mavrogiannopoulos <nmav@redhat.com>2017-08-03 11:57:52 +0200
commit7ee95dc1c31133f6dde92f4b104359061bfeb700 (patch)
treecc8af8a792328db8813f51257c2626590a974194 /lib/x509/pkcs7.c
parent7b1f0ab57a596fc2bde709ecf5a2c56f69593b5a (diff)
downloadgnutls-7ee95dc1c31133f6dde92f4b104359061bfeb700.tar.gz
Pass the signature algorithm lower in the verification stack
This will allow enhancing the back-ends (PKCS#11 and ext) for signing with the new signature algorithms like RSA-PSS and Ed25519. Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
Diffstat (limited to 'lib/x509/pkcs7.c')
-rw-r--r--lib/x509/pkcs7.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/x509/pkcs7.c b/lib/x509/pkcs7.c
index c0b0810b0c..4bb8d863a8 100644
--- a/lib/x509/pkcs7.c
+++ b/lib/x509/pkcs7.c
@@ -2536,7 +2536,8 @@ int gnutls_pkcs7_sign(gnutls_pkcs7_t pkcs7,
goto cleanup;
}
- ret = privkey_sign_and_hash_data(signer_key, &sigdata, &signature, &params);
+ ret = privkey_sign_and_hash_data(signer_key, _gnutls_pk_to_sign_entry(params.pk, dig),
+ &sigdata, &signature, &params);
if (ret < 0) {
gnutls_assert();
goto cleanup;