You can take the code in apps/req.c and extract the pieces you need.



On 07/20/2012 10:17 AM, Abyss Lingvo wrote:
Hi all!

How to create certificate request programmatically via OpenSSL API?

This is the solution for command line utility:
openssl genrsa -out server_key.pem -passout pass:$passwd -des3 1024

openssl req -new -key server_key.pem -passin pass:$passwd \
-passout pass:$passwd -out server_req.pem -days 1095 \
-subj /C=US/ST=City/L=City/O=company/OU=SSLServers/CN=localhost/emailAddress=sslser...@company.com

How to do the same but using OpenSSL API?
Best Regards
xidex


Reply via email to