aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Simons <jon@jonsimons.org>2018-06-08 18:32:32 -0400
committerAndreas Schneider <asn@cryptomilk.org>2018-06-28 09:06:30 +0200
commitc8d6445d44f239b6dc2c9261dc796bf06c800ec1 (patch)
treed6ca40afd80a669a24db0d542e1d7b736d79720f
parentd4a4ce4d44a9c4431dd9884fbfc458e70c9a5eb5 (diff)
downloadlibssh-c8d6445d44f239b6dc2c9261dc796bf06c800ec1.tar.gz
libssh-c8d6445d44f239b6dc2c9261dc796bf06c800ec1.tar.xz
libssh-c8d6445d44f239b6dc2c9261dc796bf06c800ec1.zip
packet_crypt: remove `set_decrypt_key` upon `ssh_packet_decrypt_len`
In 06b9901e64f1ea2a1141115e5645552034d25850, invocations of `set_decrypt_key` and `set_encrypt_key` were moved into the `ssh_packet_newkeys` callback, away from the packet decrypt and encrypt functions. Remove the extra `set_decrypt_key` for the case that an `aead_decrypt_length` is not NULL. At this time, only the chacha20-poly1305@openssh.com cipher is affected by this change. Signed-off-by: Jon Simons <jon@jonsimons.org> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
-rw-r--r--src/packet_crypt.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/src/packet_crypt.c b/src/packet_crypt.c
index 57be946f..b2f075c4 100644
--- a/src/packet_crypt.c
+++ b/src/packet_crypt.c
@@ -58,14 +58,6 @@ uint32_t ssh_packet_decrypt_len(ssh_session session,
if (session->current_crypto != NULL) {
if (session->current_crypto->in_cipher->aead_decrypt_length != NULL) {
- rc =
- session->current_crypto->in_cipher->set_decrypt_key(
- session->current_crypto->in_cipher,
- session->current_crypto->decryptkey,
- session->current_crypto->decryptIV);
- if (rc < 0) {
- return (uint32_t)-1;
- }
session->current_crypto->in_cipher->aead_decrypt_length(
session->current_crypto->in_cipher, source, destination,
session->current_crypto->in_cipher->lenfield_blocksize,