Re: Using SSL with CRYPT_SESSINFO_NETWORKSOCKET

Peter Gutmann <[email protected]> Thu, 12 Jul 2012 23:47:43 +1200
Newsgroups gmane.comp.encryption.cryptlib
Message-ID <[email protected]>
Stephen Hurd <[email protected]> writes:

>It appears impossible to use CRYPT_SESSINFO_NETWORKSOCKET with SSL/TLS in
>3.4.1... the code appears to not allow setting CRYPT_SESSINFO_NETWORKSOCKET
>if CRYPT_SESSINFO_SERVER_NAME is set (session/sess_attr.c Lines 725-730) and
>not allow setting CRYPT_SESSINFO_SERVER_NAME if CRYPT_SESSINFO_NETWORKSOCKET
>us set (Lines 105-107, called via line 890).  So the second call always
>returns CRYPT_ERROR_INITED.

That's because they're mutually exclusive, CRYPT_SESSINFO_SERVER_NAME tells
cryptlib to open a socket connection to a particular server,
CRYPT_SESSINFO_NETWORKSOCKET tells cryptlib to use an existing socket
connection.

>Since the server name is required for negotiation with TLS 1.1 (backtrace
>snippet included), the session fails to activate.  Setting
>CRYPT_SESSINFO_VERSION to 1 permits it to negotiate with just
>CRYPT_SESSINFO_NETWORKSOCKET set, but the session cache will fail at
>session/ssl_kmgmt.c, line 976 due to the missing server name.

That's fixed for the 3.4.2 release.

Peter.


_______________________________________________
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.