TLS Handshake failure
"Mathias Spoerr" <[email protected]> Tue, 18 Dec 2012 14:41:49 +0100
| Newsgroups | gmane.comp.encryption.cryptlib |
|---|---|
| Message-ID | <[email protected]> |
Hello,
For all https servers I want to connect to, I get a TLS Handshake Failure. I
use cryptlib version 3.4.2. The code is the following:
int retKey = 0;
// Create the session
retKey = cryptCreateSession(&cryptSession, CRYPT_UNUSED,
CRYPT_SESSION_SSL);
// Add the server name, user name, and password
retKey = cryptSetAttributeString(cryptSession,
CRYPT_SESSINFO_SERVER_NAME, adresse.c_str(), adresse.size());
//retKey = cryptSetAttribute(cryptSession, CRYPT_SESSINFO_VERSION,
1);
retKey = cryptSetAttribute(cryptSession, CRYPT_SESSINFO_SERVER_PORT,
httpsPort);
//retKey = cryptSetAttributeString(cryptSession,
CRYPT_SESSINFO_USERNAME, httpUser.c_str(), httpUser.length());
//retKey = cryptSetAttributeString(cryptSession,
CRYPT_SESSINFO_PASSWORD, httpPass.c_str(), httpPass.length());
// Activate the session
retKey = cryptSetAttribute(cryptSession, CRYPT_SESSINFO_ACTIVE, 1);
// ReadTimeout auf 30 Sekunden setzen
// retKey = cryptSetAttribute(cryptSession,
CRYPT_OPTION_NET_READTIMEOUT, 30);
if (retKey != CRYPT_OK)
{
.
}
Cryptlib returns "-26" (CRYPT_ERROR_INVALID). In Wireshark I see the Client
Hello, the Server Hello, the Server certificate and then the Handshake
failure sent by the client. Do I have to trust the server certificate? How
can I do this?
Thanks,
Mathias
_______________________________________________
Cryptlib mailing list
[email protected] via Mail: [email protected]
Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/
http://news.gmane.org/gmane.comp.encryption.cryptlib
Posts from non-subscribed addresses are blocked to prevent spam, please
subscribe in order to post messages.
capture.pcapng
(application/octet-stream, 12.8 KB) - not displayed