aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/src
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2018-08-14 16:11:03 +0200
committerIngela Anderton Andin <[email protected]>2018-08-14 16:11:03 +0200
commit4232ea037de2258b268bead0920fa73a539a0954 (patch)
treec914a6534132b594b8f0e672f8681f5cd83cb4c5 /lib/ssl/src
parentf54e6b513e746344d5252c269b8bb072dd6136a3 (diff)
parent418cff799556db987e59bbedb0e3ec1344b52089 (diff)
downloadotp-4232ea037de2258b268bead0920fa73a539a0954.tar.gz
otp-4232ea037de2258b268bead0920fa73a539a0954.tar.bz2
otp-4232ea037de2258b268bead0920fa73a539a0954.zip
Merge branch 'ingela/ssl/ERL-668/improve-err-msg/OTP-15234' into maint
* ingela/ssl/ERL-668/improve-err-msg/OTP-15234: ssl: Improve error message
Diffstat (limited to 'lib/ssl/src')
-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.