Skip to content
Snippets Groups Projects
Commit a69ee45c authored by Martin Nilsson's avatar Martin Nilsson
Browse files

Simplify RSA signature and at the same time fix a bug preventing non-byte RSA key sizes.

parent 688d9a55
No related branches found
No related tags found
No related merge requests found
......@@ -198,10 +198,7 @@ class CipherSpec {
case SIGNATURE_rsa:
{
string digest = Crypto.MD5->hash(data) + Crypto.SHA1->hash(data);
int size = session->private_key->key_size()/8;
struct->add_int16(size);
struct->add_int(session->private_key->raw_sign(digest), size);
struct->add_hint(session->private_key->raw_sign(digest), 2);
return struct;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment