Skip to content

Commit d35d086

Browse files
committed
std.crypto.Certificate: add more object id
1 parent 7623f3f commit d35d086

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/std/crypto/Certificate.zig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,12 @@ pub const Attribute = enum {
8787

8888
pub const NamedCurve = enum {
8989
secp384r1,
90+
secp521r1,
9091
X9_62_prime256v1,
9192

9293
pub const map = std.ComptimeStringMap(NamedCurve, .{
9394
.{ &[_]u8{ 0x2B, 0x81, 0x04, 0x00, 0x22 }, .secp384r1 },
95+
.{ &[_]u8{ 0x2B, 0x81, 0x04, 0x00, 0x23 }, .secp521r1 },
9496
.{ &[_]u8{ 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x01, 0x07 }, .X9_62_prime256v1 },
9597
});
9698
};
@@ -754,6 +756,9 @@ fn verify_ecdsa(
754756
};
755757

756758
switch (sig_named_curve) {
759+
.secp521r1 => {
760+
return error.CertificateSignatureNamedCurveUnsupported;
761+
},
757762
.secp384r1 => {
758763
const P = crypto.ecc.P384;
759764
const Ecdsa = crypto.sign.ecdsa.Ecdsa(P, Hash);

0 commit comments

Comments
 (0)