Yes I see lots of fields to fill in for the X509 which is definitely the way
to go
from the RFC5480.
Is there any sample code out there to make a X509. I see that
EVP_PKEY_assign_EC_KEY(***);
r = i2d_PUBKEY_Bio(bp,evpkey);
will create a DER and from there any code to an x509.
redpath wrote:
>
> I have saved the private and public key of the ECDSA;
> Just sample code below.
>
> int len= i2o_ECPublicKey(eckey,NULL);
> unsigned char *buf=(unsigned char *)0;
> ret= i2o_ECPublicKey(eckey,( unsigned char **)&buf);
> if (!ret){
> printf("Public key to octect string failed\n");
> return 1;
> }
> printf("\ni2o public\n");
> for (int i=0; i<len; i++)
> printf("%X ",buf[i]);
> printf("\n\n");
>
> printf("started SHA1\n");
>
> fp = fopen(args[1],"wb");
> if (fp==NULL){
> printf("Public file [%s] failed to create\n",args[1]);
> return 1;
> }
> fwrite(buf,1,len,fp);
> fclose(fp);
>
> And have used this public key to check signature simply by reading the
> file back
> as data to "pubdata" using this function.
>
> pubkey= o2i_ECPublicKey(&pubkey, (const unsigned char **)&pubdata,
> publen);
>
> But what is the best packaging for this Public key as in handing it out?
> I can simply provide this file but is there some packaging format
> generally
> used as Best Practices?
>
>
>
--
View this message in context:
http://old.nabble.com/ECDSA-pub-priv-data-storage-Best-Practices-tp34477847p34479258.html
Sent from the OpenSSL - Dev mailing list archive at Nabble.com.
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [email protected]
Automated List Manager [email protected]