mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 22:33:08 +00:00
std.crypto.tls: support the same key sizes as certificate verification
This commit is contained in:
parent
a6ede7ba86
commit
fbaefcaa94
@ -1840,7 +1840,7 @@ const CertificatePublicKey = struct {
|
|||||||
const exponent = components.exponent;
|
const exponent = components.exponent;
|
||||||
const modulus = components.modulus;
|
const modulus = components.modulus;
|
||||||
switch (modulus.len) {
|
switch (modulus.len) {
|
||||||
inline 128, 256, 512 => |modulus_len| {
|
inline 128, 256, 384, 512 => |modulus_len| {
|
||||||
const key: PublicKey = try .fromBytes(exponent, modulus);
|
const key: PublicKey = try .fromBytes(exponent, modulus);
|
||||||
const sig = RsaSignature.fromBytes(modulus_len, encoded_sig);
|
const sig = RsaSignature.fromBytes(modulus_len, encoded_sig);
|
||||||
try RsaSignature.concatVerify(modulus_len, sig, msg, key, Hash);
|
try RsaSignature.concatVerify(modulus_len, sig, msg, key, Hash);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user