Rehandshake handling
I have a blackbox API server that insists on issuing a TLS rehandshake request early into the request. gnutls_record_recv()
returns E_REHANDSHAKE
which gnutls-guile throws back to userland as an exception. Since the end user operates on a higher level API such as http-request
, the userland ends up being (web request)
. If I understand the logic correctly, gnutls-guile (being the client of gnutls) should implement the mechanism to discover and execute the rehandshake and then retry the recv call, which probably means the TLS wrapping (and (web request)
in Guile itself) should be modified to accept an option to control whether rehandshakes are allowed. I can probably implement this myself, however I want to make sure that my logic is sound and I'm not missing any subtle detail.