- spki_der=(unsigned char *)Malloc(
- strlen(cv->value)+1);
- if (spki_der == NULL)
- {
- BIO_printf(bio_err,"Malloc failure\n");
- goto err;
- }
- j = EVP_DecodeBlock(spki_der, (unsigned char *)cv->value,
- strlen(cv->value));
- if (j <= 0)
- {
- BIO_printf(bio_err, "Can't b64 decode SPKAC structure\n");
- goto err;
- }
-
- p=spki_der;
- spki = d2i_NETSCAPE_SPKI(&spki, &p, j);
- Free(spki_der);
- spki_der = NULL;