mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 04:47:35 +00:00
LibCrypto: Replace from_base{2,8,10,16}() & to_base10 with from_base(N)
This allows us to support parsing and serializing BigIntegers to and from any base N (such that 2 <= N <= 36).
This commit is contained in:
parent
a768131720
commit
005d75656e
14 changed files with 56 additions and 132 deletions
|
@ -119,7 +119,7 @@ Optional<Certificate> Certificate::parse_asn1(ReadonlyBytes buffer, bool)
|
|||
ENTER_SCOPE_WITHOUT_TYPECHECK("Certificate::version");
|
||||
READ_OBJECT_OR_FAIL(Integer, Crypto::UnsignedBigInteger, value, "Certificate::version");
|
||||
if (!(value < 3)) {
|
||||
dbgln_if(TLS_DEBUG, "Certificate::version Invalid value for version: {}", value.to_base10());
|
||||
dbgln_if(TLS_DEBUG, "Certificate::version Invalid value for version: {}", value.to_base(10));
|
||||
return {};
|
||||
}
|
||||
certificate.version = value.words()[0];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue