Added support for different encryption schemes to private/public keys
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user