dirmngr: Gracefully handle premature termination of TLS streams. fix-1950
authorJustus Winter <justus@g10code.com>
Wed, 18 Nov 2015 14:06:48 +0000 (15:06 +0100)
committerJustus Winter <justus@g10code.com>
Wed, 18 Nov 2015 14:06:48 +0000 (15:06 +0100)
commiteb54fca4bf3ef8e0cd50b01df5b40e0d6d318d7e
tree18917c92bd1bdb4f8c8180bca75f4eaee2605fae
parent84ebf15b06e435453b2f58775f97a3a1c61a7e55
dirmngr: Gracefully handle premature termination of TLS streams.

* dirmngr/http.c (close_tls_session): New function.
(session_unref): Use the new function to close the TLS stream.
(cookie_read): If the stream terminated prematurely, close it and
return a short read.
--
With this patch, I was able to update all the keys in the Debian
keyring over hkps.

Signed-off-by: Justus Winter <justus@g10code.com>
GnuPG-bug-id: 1950
dirmngr/http.c