Ok, I answered my own question. I simply appended the private key file to the certificate file and it works like a champ. Sweet.
I'm really liking SHTTPD. Great work. Bill ________________________________ From: Bill Greene Sent: Tuesday, September 11, 2007 10:44 AM To: 'Sergey Lyubka' Cc: [email protected] Subject: RE: [shttpd-general] Embedded shttpd with SSL? I am getting a "cannot open /tmp/keys/pep.pem". Looking in config.c there are two failure legs in set_ssl method with the same text so I added "certificate" to one and "private key" to the other to help debug where this error is coming from. It appears it doesn't like the use private key. The set_ssl method in config.c uses the same pem file in calls to SSL_CTX_use_certificate_file and SSL_CTX_use_PrivateKey_file. But OpenSSL when it creates the certificate signing request generates separate files for the certificate signing request and the private key. The csr is signed by the CA and returned as a signed certificate file. This certificate files does not contain the private key. Is there an extra step I'm not aware of to somehow combine the certificate file and private key file into one file? Simple file append? This one file would satisfy both checks in set_ssl? Thanks in advance, Bill Greene ________________________________ From: Sergey Lyubka [mailto:[EMAIL PROTECTED] Sent: Monday, September 10, 2007 4:04 PM To: Bill Greene Cc: [email protected] Subject: Re: [shttpd-general] Embedded shttpd with SSL? That's right, all you need to do is to have set "ssl_certificate" in shttpd_init, and make sure to append 's' letter to the "listen_ports". Like that: ctx = shttpd_init(NULL, "listen_ports", "8080,8081s", "ssl_certificate", "shttpd.pem", NULL); 8081 port then will do SSL. Modify examples/example.c to see how it works, but use CVS version of example.c sergey The information contained in this message may be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the message and deleting all copies. Thank you.
<<inline: logo.jpg>>
------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________ shttpd-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/shttpd-general
