c++, openssl & how to create SSL context

E

Encapsulin

I am trying to add ssl support to the application:
- download http://www.openssl.org/source/openssl-0.9.8a.tar.gz
- compile it on windows XP as described in openssl/insatll.w32
- add object files to the VC project
- and use the following expression:

SSL_METHOD* pSSLMethod = SSLv3_client_method();
char sSSLFile[1024];
const char* pszRandFile = RAND_file_name(sSSLFile,
sizeof(sSSLFile));
if (pszRandFile == NULL) {
Disconnect();
return FALSE;
}

RAND_load_file(pszRandFile, -1);
if (RAND_status() == 0) {
Disconnect();
return FALSE;
}

SSL_CTX* pSSLContext = SSL_CTX_new(pSSLMethod);
if (pSSLContext == NULL) {
Disconnect();
return FALSE;
}

But last expression returned FALSE. Why pSSLContext = NULL, what is the
reason?
How to create SSL context? Is there some manual about ssl?
 
J

Jonathan Mcdougall

Encapsulin wrote:

[Please quote the message you are answering to]
How to delete this message from group?

You can't, it's too late. Next time, make sure you read a newsgroup's
charter before posting. But thanks anyways, you seldom see someone
wanting to delete his post.


Jonathan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top