mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-04 00:27:47 +00:00
LibCrypto: Use OpenSSL for RSA encryption and decryption
This commit is contained in:
parent
daa81c9b32
commit
91c393ea98
Notes:
github-actions[bot]
2025-01-13 16:01:49 +00:00
Author: https://github.com/devgianlu
Commit: 91c393ea98
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3234
2 changed files with 82 additions and 30 deletions
|
@ -10,6 +10,7 @@
|
|||
#include <LibCrypto/ASN1/DER.h>
|
||||
#include <LibCrypto/BigInt/UnsignedBigInteger.h>
|
||||
#include <LibCrypto/NumberTheory/ModularFunctions.h>
|
||||
#include <LibCrypto/OpenSSL.h>
|
||||
#include <LibCrypto/PK/PK.h>
|
||||
|
||||
namespace Crypto::PK {
|
||||
|
@ -219,6 +220,10 @@ public:
|
|||
|
||||
void set_public_key(PublicKeyType const& key) { m_public_key = key; }
|
||||
void set_private_key(PrivateKeyType const& key) { m_private_key = key; }
|
||||
|
||||
protected:
|
||||
static ErrorOr<OpenSSL_PKEY> public_key_to_openssl_pkey(PublicKeyType const& public_key);
|
||||
static ErrorOr<OpenSSL_PKEY> private_key_to_openssl_pkey(PrivateKeyType const& private_key);
|
||||
};
|
||||
|
||||
class RSA_PKCS1_EME : public RSA {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue