aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/src/tls_record_1_3.erl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2019-03-20 10:38:43 +0100
committerIngela Anderton Andin <[email protected]>2019-03-20 10:38:43 +0100
commit884503bc69157d2a3c6bd72389b4e2a800f97fb6 (patch)
tree81f8bc5c853053d899e25afc651c1237a334de78 /lib/ssl/src/tls_record_1_3.erl
parent515c1d380dcf327ff92f9f727959620c96687be8 (diff)
downloadotp-884503bc69157d2a3c6bd72389b4e2a800f97fb6.tar.gz
otp-884503bc69157d2a3c6bd72389b4e2a800f97fb6.tar.bz2
otp-884503bc69157d2a3c6bd72389b4e2a800f97fb6.zip
ssl: Correct handling of crypto exception handling.
Documentation was incorrect, and new specs provided dialyzer errors.
Diffstat (limited to 'lib/ssl/src/tls_record_1_3.erl')
-rw-r--r--lib/ssl/src/tls_record_1_3.erl7
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/ssl/src/tls_record_1_3.erl b/lib/ssl/src/tls_record_1_3.erl
index 97331e1510..5f1c64eae6 100644
--- a/lib/ssl/src/tls_record_1_3.erl
+++ b/lib/ssl/src/tls_record_1_3.erl
@@ -267,12 +267,7 @@ decipher_aead(CipherFragment, BulkCipherAlgo, Key, Seq, IV, TagLen) ->
AAD = additional_data(erlang:iolist_size(CipherFragment)),
Nonce = nonce(Seq, IV),
{CipherText, CipherTag} = aead_ciphertext_split(CipherFragment, TagLen),
- case ssl_cipher:aead_decrypt(BulkCipherAlgo, Key, Nonce, CipherText, CipherTag, AAD) of
- Content when is_binary(Content) ->
- Content;
- _ ->
- ?ALERT_REC(?FATAL, ?BAD_RECORD_MAC, decryption_failed)
- end
+ ssl_cipher:aead_decrypt(BulkCipherAlgo, Key, Nonce, CipherText, CipherTag, AAD)
catch
_:_ ->
?ALERT_REC(?FATAL, ?BAD_RECORD_MAC, decryption_failed)