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:
		| @@ -472,21 +472,20 @@ add_cert(hx509_context hxctx, void *ctx, hx509_cert cert) | ||||
|     o->type = STO_T_CERTIFICATE; | ||||
|     o->cert = hx509_cert_ref(cert); | ||||
|  | ||||
|     key_type = CKK_RSA; /* XXX */ | ||||
|     { | ||||
| 	AlgorithmIdentifier alg; | ||||
|  | ||||
| #if 0 | ||||
|     switch (EVP_PKEY_type(public_key->type)) { | ||||
|     case EVP_PKEY_RSA: | ||||
| 	key_type = CKK_RSA; | ||||
| 	break; | ||||
|     case EVP_PKEY_DSA: | ||||
| 	key_type = CKK_DSA; | ||||
| 	break; | ||||
|     default: | ||||
| 	/* XXX */ | ||||
| 	break; | ||||
| 	hret = hx509_cert_get_SPKI_AlgorithmIdentifier(context, cert, &alg); | ||||
| 	if (hret) { | ||||
| 	    ret = CKR_DEVICE_MEMORY; | ||||
| 	    goto out; | ||||
| 	} | ||||
|  | ||||
| 	key_type = CKK_RSA; /* XXX */ | ||||
|  | ||||
| 	free_AlgorithmIdentifier(&alg); | ||||
|     } | ||||
| #endif | ||||
|  | ||||
|  | ||||
|     c = CKO_CERTIFICATE; | ||||
|     add_object_attribute(o, 0, CKA_CLASS, &c, sizeof(c)); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Love Hörnquist Åstrand
					Love Hörnquist Åstrand