Skip to content
Snippets Groups Projects
Commit a796c712 authored by Niels Möller's avatar Niels Möller
Browse files

Use Crypto.crypto for the block cryptos.

Rev: lib/modules/SSL.pmod/session.pike:1.5
parent 749122fe
No related branches found
No related tags found
No related merge requests found
......@@ -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 });
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment