Add more glue to figure out what keytype this certificate is using.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22451 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2008-01-15 19:39:59 +00:00
parent b012ef1902
commit 33250f5762

View File

@@ -472,21 +472,20 @@ add_cert(hx509_context hxctx, void *ctx, hx509_cert cert)
o->type = STO_T_CERTIFICATE; o->type = STO_T_CERTIFICATE;
o->cert = hx509_cert_ref(cert); o->cert = hx509_cert_ref(cert);
key_type = CKK_RSA; /* XXX */ {
AlgorithmIdentifier alg;
#if 0 hret = hx509_cert_get_SPKI_AlgorithmIdentifier(context, cert, &alg);
switch (EVP_PKEY_type(public_key->type)) { if (hret) {
case EVP_PKEY_RSA: ret = CKR_DEVICE_MEMORY;
key_type = CKK_RSA; goto out;
break; }
case EVP_PKEY_DSA:
key_type = CKK_DSA; key_type = CKK_RSA; /* XXX */
break;
default: free_AlgorithmIdentifier(&alg);
/* XXX */
break;
} }
#endif
c = CKO_CERTIFICATE; c = CKO_CERTIFICATE;
add_object_attribute(o, 0, CKA_CLASS, &c, sizeof(c)); add_object_attribute(o, 0, CKA_CLASS, &c, sizeof(c));