File tree Expand file tree Collapse file tree 3 files changed +14
-3
lines changed
Expand file tree Collapse file tree 3 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,8 @@ use typenum::Unsigned;
99
1010use crate :: aead:: { DecryptBufferAdapter , EncryptBufferAdapter } ;
1111
12+ #[ cfg( feature = "aes-ccm" ) ]
13+ use crate :: aead:: aes:: Aes128Ccm ;
1214#[ cfg( feature = "aes-gcm" ) ]
1315use crate :: aead:: aes:: { Aes128Gcm , Aes256Gcm } ;
1416#[ cfg( feature = "chacha20" ) ]
@@ -48,6 +50,16 @@ impl HasHeaderKey for Aes256Gcm {
4850 }
4951}
5052
53+ #[ cfg( feature = "aes-ccm" ) ]
54+ impl HasHeaderKey for Aes128Ccm {
55+ fn new ( key : AeadKey ) -> Result < HeaderProtectionKey , Error > {
56+ Ok ( HeaderProtectionKey :: Aes128Ecb (
57+ aes:: Aes128 :: new_from_slice ( key. as_ref ( ) )
58+ . map_err ( |_| Error :: General ( "Invalid AES-128-GCM key" . into ( ) ) ) ?,
59+ ) )
60+ }
61+ }
62+
5163#[ cfg( feature = "chacha20poly1305" ) ]
5264impl HasHeaderKey for ChaCha20Poly1305 {
5365 fn new ( key : AeadKey ) -> Result < HeaderProtectionKey , Error > {
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ tls13_cipher_suite!(
4444 hash:: SHA256 ,
4545 HkdfUsingHmac ( hmac:: SHA256 ) ,
4646 AES_128_CCM ,
47- None // TODO: add QUIC support
47+ feature_eval_expr! ( [ feature = "quic" ] , Some ( & crate :: quic :: QuicCrypto :: < Aes128Ccm > :: DEFAULT ) , else None )
4848) ;
4949
5050#[ cfg( all( feature = "ccm" , feature = "hash-sha256" ) ) ]
Original file line number Diff line number Diff line change @@ -8,8 +8,7 @@ rust-version = "1.88.0"
88
99[dependencies ]
1010rustls-rustcrypto = { path = " ../.." , default-features = false , features = [
11- " aead-chacha20poly1305" ,
12- " aead-aes-gcm" ,
11+ " aead-full" ,
1312 " der" ,
1413 " fast" ,
1514 " kx-p256" ,
You can’t perform that action at this time.
0 commit comments