don't @panic!

This commit is contained in:
Halil Durak
2026-01-15 20:40:53 +03:00
parent 58634b54ec
commit ea2fc76d3c

View File

@@ -295,6 +295,7 @@ pub const CryptoKey = struct {
if (std.mem.eql(u8, "X25519", name)) { if (std.mem.eql(u8, "X25519", name)) {
return initX25519(extractable, key_usages, page); return initX25519(extractable, key_usages, page);
} }
log.warn(.not_implemented, "CryptoKey.init", .{ .name = name });
return error.NotSupported; return error.NotSupported;
}, },
.object => |object| { .object => |object| {
@@ -303,9 +304,13 @@ pub const CryptoKey = struct {
if (std.mem.eql(u8, "X25519", name)) { if (std.mem.eql(u8, "X25519", name)) {
return initX25519(extractable, key_usages, page); return initX25519(extractable, key_usages, page);
} }
log.warn(.not_implemented, "CryptoKey.init", .{ .name = name });
return error.NotSupported;
},
else => {
log.warn(.not_implemented, "CryptoKey.init", .{ .algorithm = algorithm });
return error.NotSupported; return error.NotSupported;
}, },
else => @panic("NYI"),
}; };
} }