(collect_private_key): Missing CKA_MODULUS is ok too (XXX why should

these be fetched given they are not used).


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19790 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2007-01-09 19:43:35 +00:00
parent d4b0d11e0a
commit a905f0338c

View File

@@ -624,14 +624,12 @@ collect_private_key(hx509_context context,
if (rsa == NULL)
_hx509_abort("out of memory");
rsa->n = getattr_bn(p, slot, session, object, CKA_MODULUS);
if (rsa->n == NULL)
_hx509_abort("CKA_MODULUS missing");
/*
* The exponent should always be present according to the pkcs11
* specification, but some smartcards leaves it out, let ignore
* any failure to fetch it.
* The exponent and modulus should always be present according to
* the pkcs11 specification, but some smartcards leaves it out,
* let ignore any failure to fetch it.
*/
rsa->n = getattr_bn(p, slot, session, object, CKA_MODULUS);
rsa->e = getattr_bn(p, slot, session, object, CKA_PUBLIC_EXPONENT);
p11rsa = calloc(1, sizeof(*p11rsa));