Skip to content

Commit

Permalink
tls13: use Error::EncryptError for encryption failures
Browse files Browse the repository at this point in the history
  • Loading branch information
ctz committed Aug 25, 2023
1 parent 83164fd commit 05aa07b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rustls/src/crypto/ring/tls13.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ impl MessageEncrypter for Tls13MessageEncrypter {
let aad = aead::Aad::from(make_tls13_aad(total_len));
self.enc_key
.seal_in_place_append_tag(nonce, aad, &mut payload)
.map_err(|_| Error::General("encrypt failed".to_string()))?;
.map_err(|_| Error::EncryptError)?;

Ok(OpaqueMessage {
typ: ContentType::ApplicationData,
Expand Down

0 comments on commit 05aa07b

Please sign in to comment.