|
hi,
i'm managing a Tis server that implements
a Secure Socket on windows platform . I have used a 9.4 open ssl source dlls
ported on windows platform.
The server performs a 48 bit authentication by
passing a PEM certificate to the client side. However i'd like to realize a 128
bit authentication by passing two certificate: one that is the standard
certificate and another one that is an additional certificate that certificates
the CA.
But i have a lot of troubles to do it. Please
consider the following sources:
SSLeay_add_ssl_algorithms();
// allocate the context
SSL_CTX *pCtx = SSL_CTX_new(SSLv23_server_method()); // set the password SSL_CTX_set_default_passwd_cb(pCtx,passcb);
//set the private key by passing the .pem file
path
dwRet =
SSL_CTX_use_PrivateKey_file(pCtx,szPrivateKeyFile,SSL_FILETYPE_PEM);
//check the private key correctnessly dwRet =
SSL_CTX_check_private_key(pCtx);
SSL_CTX_set_tmp_rsa_callback(pCtx,tmp_rsa_cb);
SSL_CTX_set_verify(pCtx,SSL_VERIFY_NONE,NULL);
SSL_CTX_set_verify_depth(pCtx,2); // add the extra certificate
dwRet =
SSL_CTX_load_verify_locations(pCtx,"C:\\TIS\\GSID.CER","C:\\TIS");
// verify the path dwRet =
SSL_CTX_set_default_verify_paths(pCtx);
.... etc
but the additional certificate is not considered by
the browsers that refuse to established the connection because don't recognize
the CA for the first certificate.
where i'm wrong???? please help me!!
|
