Hi,
I need help from the openssl users. i appreciate
somebody's help in this regard.
I am very new to openssl progarmming.
I am facing a problem in writing a client program,
which talks to a server which does client
authentication.
can anybody send me a snippet of client code.
i am sending snippet my client code.
Please correct me if i am writing the wrong APIS .
SSLeay_add_ssl_algorithms();
meth = SSLv3_client_method();
SSL_load_error_strings();
ctx = SSL_CTX_new (meth);
CHK_NULL(ctx);
if (SSL_CTX_use_certificate_file(ctx, CERTF,
SSL_FILETYPE_PEM) <= 0) {
ERR_print_errors_fp(stderr);
exit(3);
}
if (SSL_CTX_use_PrivateKey_file(ctx, KEYF,
SSL_FILETYPE_PEM) <= 0) {
ERR_print_errors_fp(stderr);
exit(4);
}
if (!SSL_CTX_check_private_key(ctx)) {
fprintf(stderr,"Private key does not match the
certificate public key\n");
exit(5);
}
ssl = SSL_new (ctx);
SSL_set_fd (ssl, sd);
err= SSL_connect (ssl);
printf("Connection error : %d",err);
biswaksen
__________________________________________________
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards�
http://movies.yahoo.com/
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]