Added support for different encryption schemes to private/public keys
This commit is contained in:
1 parent
3547a9b87d
commit
33ddaaabec
19 files changed
+100
-24
No files matched your search
@@ -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