diff options
author | lloyd <[email protected]> | 2012-01-04 21:28:34 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2012-01-04 21:28:34 +0000 |
commit | 48cbc3d991308ecc155e36ea1ac6dbfe1762a928 (patch) | |
tree | 2a0648776772e07afafffb7665e36b175f9ce795 /src/tls/tls_client.cpp | |
parent | 0937d977a5262917cca3be6c2316ed68b092a31f (diff) |
Add a hook in TLS_Channel that is called when an alert is received.
Currently has the same behavior in client and server; if we got a
NO_RENEGOTIATION alert, and we appear to be renegotiating, delete the
state if it exists.
Noticed when talking to OpenSSL 0.9.8g which rejects all renegotiation
requests.
Diffstat (limited to 'src/tls/tls_client.cpp')
-rw-r--r-- | src/tls/tls_client.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/tls/tls_client.cpp b/src/tls/tls_client.cpp index e79fb18d8..73806a1ba 100644 --- a/src/tls/tls_client.cpp +++ b/src/tls/tls_client.cpp @@ -96,6 +96,18 @@ void TLS_Client::renegotiate() secure_renegotiation.update(state->client_hello); } +void TLS_Client::alert_notify(bool, Alert_Type type) + { + if(type == NO_RENEGOTIATION) + { + if(handshake_completed && state) + { + delete state; + state = 0; + } + } + } + /* * Process a handshake message */ |