mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-28 04:09:00 +00:00
LibCrypto: Use ASN1 macros for RSA key parsing
Improve error handling in `RSA::parse_rsa_key` by using ASN1 macros and generalizing the parsing to both private and public keys.
This commit is contained in:
parent
ee50a8c0f7
commit
1f7586ce14
Notes:
github-actions[bot]
2024-11-30 10:18:46 +00:00
Author: https://github.com/devgianlu
Commit: 1f7586ce14
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2648
5 changed files with 104 additions and 101 deletions
|
@ -152,7 +152,7 @@ class RSA : public PKSystem<RSAPrivateKey<IntegerType>, RSAPublicKey<IntegerType
|
|||
public:
|
||||
using KeyPairType = RSAKeyPair<PublicKeyType, PrivateKeyType>;
|
||||
|
||||
static KeyPairType parse_rsa_key(ReadonlyBytes der);
|
||||
static ErrorOr<KeyPairType> parse_rsa_key(ReadonlyBytes der, bool is_private, Vector<StringView> current_scope);
|
||||
static KeyPairType generate_key_pair(size_t bits = 256, IntegerType e = 65537)
|
||||
{
|
||||
IntegerType p;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue