Hi all,
 
I've built the appropriate libraries using the standard instructions in INSTALL.W32. No errors. Then I proceeded to write the appropriate base source for my application. (Purpose is to simply open an SSL link between an in-house server and client) I am linking statically, using the debug versions so I can step into everything.
 
When SSL_accept returns, it gives me a -1 return. I've traced into the function, and the point where it actually returns an invalid code is:
 
c=ssl3_choose_cipher(s,s->session->ciphers, ssl_get_ciphers_by_id(s));
 
Where c == NULL at the end of this. As far as I understand the way it works, this means that it was unable to choose an appropriate cipher based on my certificate. Now I do have a valid list of ciphers, I've seen that, it steps through all of them.
 
I've attached the certificate and the private key I am attempting to use. The commands I used to generate them were:
openssl -genrsa -out private.pem
openssl req -new -key private.pem -out cert.pem -config ..\apps\openssl.cnf -x509
 
My pre-accept setup contains:
 
OpenSSL_add_ssl_algorithms();
SSL_load_error_strings();
m_pMethod  = SSLv23_server_method();
m_pContext  = SSL_CTX_new(m_pMethod);
 
and then using that context in SSL_new(m_pContext)
 
I've registered the certifcate and private key by using:
SSL_CTX_use_certificate_file(..,...,SSL_FILETYPE_PEM)
SSL_CTX_use_RSAPrivateKey_file(...,...,SSL_FILETYPE_PEM)
 
I've added a password callback and a info callback to see what happens, but no joy in solving it.
 
I'm very new to this, and probaly doing something stupid or silly, but I'm getting horribly stuck and would appreciate any help / comments anyone might throw my way.
 
_________________
Pascal
Qbik New Zealand
 
 
 

cert.pem

private.pem

Reply via email to