[EMAIL PROTECTED] wrote:

hi,

does anyone have a vc++ workspace for building the OpenSLL project.

my program is currently never returning after executing the
SSL_CTX_use_PrivateKey_file(pxCTX, KEYF, SSL_FILETYPE_PEM)
call.

to build a debuggable version, i tried to edit the ntdll.mak file by
changing the compiler switches, but i still can't seem to debug into the
OpenSSL calls.

below is a snipet of some of the code i am using:

/* SSL preliminaries. We keep the certificate and key with the context. */

SSL_load_error_strings();
SSLeay_add_ssl_algorithms();
meth = SSLv23_server_method();
pxCTX = SSL_CTX_new (meth);
if (!pxCTX) {
ERR_print_errors_fp(stderr);
exit(2);
}

if ((i = SSL_CTX_use_certificate_file(pxCTX, CERTF, SSL_FILETYPE_PEM))
<= 0)
{
ERR_print_errors_fp(stderr);
exit(3);
}
if ((i = SSL_CTX_use_PrivateKey_file(pxCTX, KEYF, SSL_FILETYPE_PEM)) <=
0)
{
ERR_print_errors_fp(stderr);
exit(4);
}

if (!SSL_CTX_check_private_key(pxCTX))
{
fprintf(stderr,"Private key does not match the certificate public
key\n");
exit(5);
}

/* ----------------------------------------------- */
/* TCP connection is ready. Do server side SSL. */

ssl = SSL_new (pxCTX); CHK_NULL(ssl);
SSL_set_fd (ssl, GetSocketValue());
err = SSL_accept (ssl); CHK_SSL(err);

/* Get the cipher - opt */

printf ("SSL connection using %s\n", SSL_get_cipher (ssl));

/* Get client's certificate (note: beware of dynamic allocation) - opt */


thanks in advance,

dan

______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]


Here a link to a resource http://www.iconsinc.com/~agray/ossldev/ <http://www.iconsinc.com/%7Eagray/ossldev/>

it will build for version 0.9.6 and there is a link for version 0.9.7

library will bebuilded against ntdll.mak meaning dynamic DLL .
have luck

______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]


Reply via email to