From 418cff799556db987e59bbedb0e3ec1344b52089 Mon Sep 17 00:00:00 2001 From: Ingela Anderton Andin Date: Tue, 17 Jul 2018 17:50:04 +0200 Subject: ssl: Improve error message --- lib/ssl/src/tls_handshake.erl | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/ssl') 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. -- cgit v1.2.3