On May 19, 2008 02:09:54 pm Kenneth Goldman wrote:
> Is there sample code anywhere for how to construct X509 certificates
> programmatically, through the API, not the command line?
>
> The documentation includes the serialization API's, but?
> little else.
>
> I assume, since it can be done from the command line, that
> the code exists and is just not documented.  Could I be
> wrong?
>
Hi Ken:

Well, there are lots of ways to generate a certificate - depends on the level 
to which you want to configure each cert.

One way is in the code for WvStreams  WvX509Mgr::create_selfissued at:

http://repo.or.cz/w/wvstreams.git?a=blob;f=crypto/wvx509mgr.cc;h=bcb5247490d7dc8215d63e3fca8a1aa91d67b75c;hb=HEAD

Although there are many other ways to do it (do you want to use the settings 
in openssl.cnf? then you may want to take a look at the code in the 
OpenSSL "req" or "ca" apps (in the apps subdirectory - req.c and ca.c)

Have fun.

-- 
Patrick Patterson
President and Chief PKI Architect,
Carillon Information Security Inc.
http://www.carillon.ca
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to