"Bill G." wrote:
>
> Hello List,
>
> I am trying to write a simple SSL server in C but keep getting
> a "no shared cipher" error. I'm fairly certain the key and certificates
> are OK because they work with openssl s_server.
>
> I have been playing with this code for several days and am at a loss to
> figure what the problem is.
>
> The code below produces this:
> accept status -1
> error:1408A0C1:SSL routines:SSL3_GET_CLIENT_HELLO:no shared cipher
>
> Any help would be greatly appreciated.
>
> thanks,
> Bill G.
>
>
...
> s_handle = SSL_new(ctx) ;
...
> /* private key */
> status = SSL_use_RSAPrivateKey_file(s_handle,keyfile,SSL_FILETYPE_PEM);
...
>SSL_CTX_use_certificate_file(ctx,certificatefile,SSL_FILETYPE_PEM)
Your problems is the calls above. Either assign the key and certificate
to the SSL_CTX *before* calling SSL_new() or assign both to the SSL
structure afterwards.
Steve.
--
Dr Stephen N. Henson. http://www.drh-consultancy.demon.co.uk/
Personal Email: [EMAIL PROTECTED]
Senior crypto engineer, Celo Communications: http://www.celocom.com/
Core developer of the OpenSSL project: http://www.openssl.org/
Business Email: [EMAIL PROTECTED] PGP key: via homepage.
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]