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?
- 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?