File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
rustls-wolfcrypt-provider/src/aead Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -65,8 +65,8 @@ impl Tls12AeadAlgorithm for Aes128Gcm {
6565 ) -> Result < ConnectionTrafficSecrets , UnsupportedOperationError > {
6666 let mut iv_as_vec = vec ! [ 0u8 ; GCM_NONCE_LENGTH ] ;
6767
68- iv_as_vec. copy_from_slice ( iv) ;
69- iv_as_vec. copy_from_slice ( explicit) ;
68+ iv_as_vec[ ..iv . len ( ) ] . copy_from_slice ( iv) ;
69+ iv_as_vec[ iv . len ( ) .. ] . copy_from_slice ( explicit) ;
7070
7171 Ok ( ConnectionTrafficSecrets :: Aes128Gcm {
7272 key,
Original file line number Diff line number Diff line change @@ -65,8 +65,8 @@ impl Tls12AeadAlgorithm for Aes256Gcm {
6565 ) -> Result < ConnectionTrafficSecrets , UnsupportedOperationError > {
6666 let mut iv_as_vec = vec ! [ 0u8 ; GCM_NONCE_LENGTH ] ;
6767
68- iv_as_vec. copy_from_slice ( iv) ;
69- iv_as_vec. copy_from_slice ( explicit) ;
68+ iv_as_vec[ ..iv . len ( ) ] . copy_from_slice ( iv) ;
69+ iv_as_vec[ iv . len ( ) .. ] . copy_from_slice ( explicit) ;
7070
7171 Ok ( ConnectionTrafficSecrets :: Aes256Gcm {
7272 key,
You can’t perform that action at this time.
0 commit comments