]> granicus.if.org Git - curl/commit
ossl_connect_common: detect connection re-use
authorHeinrich Ko <Heinrich.Ko@am.sony.com>
Thu, 18 Nov 2010 22:07:57 +0000 (14:07 -0800)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 6 Dec 2010 13:41:18 +0000 (14:41 +0100)
commit315e5277dc297407d98e0b017fc325e86657738a
treea8fc228e24ec407188fe5dc5070646495b34f0e1
parent5c7c9a768d009319520142fcaee1dea33625060f
ossl_connect_common: detect connection re-use

ossl_connect_common() now checks whether or not 'struct
connectdata->state' is equal 'ssl_connection_complete' and if so, will
return CURLE_OK with 'done' set to 'TRUE'. This check prevents
ossl_connect_common() from creating a new ssl connection on an existing
ssl session which causes openssl to fail when it tries to parse an
encrypted TLS packet since the cipher data was effectively thrown away
when the new ssl connection was created.

Bug: http://curl.haxx.se/mail/lib-2010-11/0169.html
lib/ssluse.c