Added support for different encryption schemes to private/public keys

This commit is contained in:
Martin Willi
2010-08-10 18:46:30 +02:00
parent 3547a9b87d
commit 33ddaaabec
19 changed files with 100 additions and 24 deletions
@@ -59,12 +59,12 @@ bool test_rsa_gen()
return FALSE;
}
free(sig.ptr);
if (!public->encrypt(public, data, &crypt))
if (!public->encrypt(public, ENCRYPT_RSA_PKCS1, data, &crypt))
{
DBG1(DBG_CFG, "encrypting data with RSA failed");
return FALSE;
}
if (!private->decrypt(private, crypt, &plain))
if (!private->decrypt(private, ENCRYPT_RSA_PKCS1, crypt, &plain))
{
DBG1(DBG_CFG, "decrypting data with RSA failed");
return FALSE;