mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 13:19:05 +00:00
LibCrypto+LibWeb: De-templetize RSA and EC key types
There is no need to have `RSAPrivateKey`, `RSAPublicKey`, `ECPrivateKey` and `ECPublicKey` to be templatize to utilize different implementation of numbers.
This commit is contained in:
parent
7f44b88eea
commit
289f2b24bf
Notes:
github-actions[bot]
2025-06-25 00:23:30 +00:00
Author: https://github.com/devgianlu
Commit: 289f2b24bf
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4950
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/alimpfard
Reviewed-by: https://github.com/konradekk
Reviewed-by: https://github.com/shannonbooth
9 changed files with 113 additions and 122 deletions
|
@ -14,7 +14,6 @@
|
|||
#include <LibCrypto/Certificate/Certificate.h>
|
||||
#include <LibCrypto/OpenSSL.h>
|
||||
#include <LibCrypto/PK/RSA.h>
|
||||
#include <LibCrypto/SecureRandom.h>
|
||||
|
||||
#include <openssl/core_names.h>
|
||||
#include <openssl/evp.h>
|
||||
|
@ -121,7 +120,7 @@ ErrorOr<RSA::KeyPairType> RSA::parse_rsa_key(ReadonlyBytes der, bool is_private,
|
|||
}
|
||||
}
|
||||
|
||||
ErrorOr<RSA::KeyPairType> RSA::generate_key_pair(size_t bits, IntegerType e)
|
||||
ErrorOr<RSA::KeyPairType> RSA::generate_key_pair(size_t bits, UnsignedBigInteger e)
|
||||
{
|
||||
auto ctx = TRY(OpenSSL_PKEY_CTX::wrap(EVP_PKEY_CTX_new_from_name(nullptr, "RSA", nullptr)));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue