diff options
| author | Ingela Anderton Andin <[email protected]> | 2018-07-17 17:50:04 +0200 |
|---|---|---|
| committer | Ingela Anderton Andin <[email protected]> | 2018-07-17 17:50:04 +0200 |
| commit | 418cff799556db987e59bbedb0e3ec1344b52089 (patch) | |
| tree | e4183b9c7259ae25d712f345b8b560aebbdaef5e /lib/ssl | |
| parent | d557a4090f593faff4ef4f990a1ca73bfebaab83 (diff) | |
| download | otp-418cff799556db987e59bbedb0e3ec1344b52089.tar.gz otp-418cff799556db987e59bbedb0e3ec1344b52089.tar.bz2 otp-418cff799556db987e59bbedb0e3ec1344b52089.zip | |
ssl: Improve error message
Diffstat (limited to 'lib/ssl')
| -rw-r--r-- | lib/ssl/src/tls_handshake.erl | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/ssl/src/tls_handshake.erl b/lib/ssl/src/tls_handshake.erl index f1eecb2875..7f5c2e07f6 100644 --- a/lib/ssl/src/tls_handshake.erl +++ b/lib/ssl/src/tls_handshake.erl @@ -126,6 +126,9 @@ hello(#client_hello{client_version = ClientVersion, handle_client_hello(Version, Hello, SslOpts, Info, Renegotiation) end catch + error:{case_clause,{asn1, Asn1Reason}} -> + %% ASN-1 decode of certificate somehow failed + ?ALERT_REC(?FATAL, ?INTERNAL_ERROR, {failed_to_decode_own_certificate, Asn1Reason}); _:_ -> ?ALERT_REC(?FATAL, ?HANDSHAKE_FAILURE, malformed_handshake_data) end. |
