aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2018-07-17 17:50:04 +0200
committerIngela Anderton Andin <[email protected]>2018-07-17 17:50:04 +0200
commit418cff799556db987e59bbedb0e3ec1344b52089 (patch)
treee4183b9c7259ae25d712f345b8b560aebbdaef5e /lib
parentd557a4090f593faff4ef4f990a1ca73bfebaab83 (diff)
downloadotp-418cff799556db987e59bbedb0e3ec1344b52089.tar.gz
otp-418cff799556db987e59bbedb0e3ec1344b52089.tar.bz2
otp-418cff799556db987e59bbedb0e3ec1344b52089.zip
ssl: Improve error message
Diffstat (limited to 'lib')
-rw-r--r--lib/ssl/src/tls_handshake.erl3
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.