aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2023-01-16 22:19:49 -0700
committerAndrew Kelley <andrew@ziglang.org>2023-01-17 00:09:38 -0700
commitd35d086ae6206b706c9116d0376cabbdf6a25650 (patch)
tree2b8af517d767df8cddc6476e1adc30f88f3e99e0 /lib
parent7623f3fad0f077d06ffef9eccdf77cb847e14f35 (diff)
downloadzig-d35d086ae6206b706c9116d0376cabbdf6a25650.tar.gz
zig-d35d086ae6206b706c9116d0376cabbdf6a25650.zip
std.crypto.Certificate: add more object id
Diffstat (limited to 'lib')
-rw-r--r--lib/std/crypto/Certificate.zig5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/std/crypto/Certificate.zig b/lib/std/crypto/Certificate.zig
index 5785b40433..2916239f16 100644
--- a/lib/std/crypto/Certificate.zig
+++ b/lib/std/crypto/Certificate.zig
@@ -87,10 +87,12 @@ pub const Attribute = enum {
pub const NamedCurve = enum {
secp384r1,
+ secp521r1,
X9_62_prime256v1,
pub const map = std.ComptimeStringMap(NamedCurve, .{
.{ &[_]u8{ 0x2B, 0x81, 0x04, 0x00, 0x22 }, .secp384r1 },
+ .{ &[_]u8{ 0x2B, 0x81, 0x04, 0x00, 0x23 }, .secp521r1 },
.{ &[_]u8{ 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x01, 0x07 }, .X9_62_prime256v1 },
});
};
@@ -754,6 +756,9 @@ fn verify_ecdsa(
};
switch (sig_named_curve) {
+ .secp521r1 => {
+ return error.CertificateSignatureNamedCurveUnsupported;
+ },
.secp384r1 => {
const P = crypto.ecc.P384;
const Ecdsa = crypto.sign.ecdsa.Ecdsa(P, Hash);