My question is simple. Should I be using the NETSCAPE_* series of
macros/functions to obtain a public key from a KEYGEN web form
element?

char *spkstr = NULL;
EVP_PKEY *pkey = NULL;
NETSCAPE_SPKI *spki = NULL;

 if ((spkstr[-1] == '\r')||(spkstr[-1] == '\n')) {
         spkstr--;
 }

 spki = NETSCAPE_SPKI_b64_decode(spkstr, strlen(spkstr));
 if (sizeof(spki)<4) {
  printf("error decoding spki");
 }

 pkey = NETSCAPE_SPKI_get_pubkey(spki);
 if (pkey == NULL) {
  printf('Error getting public key');
 }

Or a combination of the ASN1_* and X509_* series of functions?

My assumption based on the example provided in apps/spkac.c is to use
the NETSCAPE_* structs and functions. However I am running into a
problem trying to extract the public key, challenge, signature from an
existing SPKAC. Any help is appreciated.
-- 
Jason Gerfen
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [email protected]
Automated List Manager                           [email protected]

Reply via email to