From a796c712088d026e0fe9259ca2610112b7aacbd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20M=C3=B6ller?= <nisse@lysator.liu.se> Date: Thu, 15 May 1997 21:39:20 +0200 Subject: [PATCH] Use Crypto.crypto for the block cryptos. Rev: lib/modules/SSL.pmod/session.pike:1.5 --- lib/modules/SSL.pmod/session.pike | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/modules/SSL.pmod/session.pike b/lib/modules/SSL.pmod/session.pike index 744b44680f..21bf17d0f5 100644 --- a/lib/modules/SSL.pmod/session.pike +++ b/lib/modules/SSL.pmod/session.pike @@ -127,6 +127,11 @@ array new_server_states(string client_random, string server_random) read_state->crypt->set_iv(keys[4]); write_state->crypt->set_iv(keys[5]); } + if (cipher_spec->cipher_type == CIPHER_BLOCK) + { /* Crypto.crypto takes care of splitting input into blocks */ + read_state->crypt = Crypto.crypto(read_state->crypt); + write_state->crypt = Crypto.crypto(write_state->crypt); + } } return ({ read_state, write_state }); } @@ -153,6 +158,11 @@ array new_client_states(string client_random, string server_random) read_state->crypt->set_iv(keys[5]); write_state->crypt->set_iv(keys[4]); } + if (cipher_spec->cipher_type == CIPHER_BLOCK) + { /* Crypto.crypto takes care of splitting input into blocks */ + read_state->crypt = Crypto.crypto(read_state->crypt); + write_state->crypt = Crypto.crypto(write_state->crypt); + } } return ({ read_state, write_state }); } -- GitLab