On Wed, Jan 11, 2006, Amir Yiron wrote: > Hello, > > I need my embedded application to be capable of creating a CA and creating > SSL certificate. > My operating system is eCos, which means I don't have shell or any scripts, > and I can't run utilities (However, I have a file system!). > I can only use a C interface. > > I'm looking for a way to do what the 'openssl' utility does - just by calling > OpenSSL library C functions. > e.g. I want to generate the CA root certificate and key, > so instead of calling: > openssl req -x509 -newkey rsa -out cacert.pem -outform PEM -days 1825 > I want to do it in C code, probably by one of the following ways: > 1. call the main code of the openssl utility as a function, and prepare an > appropriate arg/argc arguments vector, or > 2. call directly the specific C function for the specific openssl subcommand > ('req' in this case) with appropriate parameters. > > Note: > - I can't use Unix specific APIs like getenv(); > - command execution cannot be interactive (command arguments and > configuration files have to supply all required parameters). > >
The example code in demos/x509/mkcert.c would be a good starting point. Steve. -- Dr Stephen N. Henson. Email, S/MIME and PGP keys: see homepage OpenSSL project core developer and freelance consultant. Funding needed! Details on homepage. Homepage: http://www.drh-consultancy.demon.co.uk ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]