From a905f0338c7acefebe6c2d41c7629614dc5b0132 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Tue, 9 Jan 2007 19:43:35 +0000 Subject: [PATCH] (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 --- lib/hx509/ks_p11.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/hx509/ks_p11.c b/lib/hx509/ks_p11.c index beabed0a1..534c4ecea 100644 --- a/lib/hx509/ks_p11.c +++ b/lib/hx509/ks_p11.c @@ -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));