We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 432808b commit 2356d5cCopy full SHA for 2356d5c
pdns/pkcs11signers.cc
@@ -352,7 +352,9 @@ class Pkcs11Token {
352
if (!GetAttributeValue2(d_public_key, attr)) {
353
d_ecdsa_params = attr[0].str();
354
if (d_ecdsa_params == "\x06\x08\x2a\x86\x48\xce\x3d\x03\x01\x07") d_bits = 256;
355
- if (d_ecdsa_params == "\x06\x05\x2b\x81\x04\x00\x22") d_bits = 384;
+ else if (d_ecdsa_params == "\x06\x05\x2b\x81\x04\x00\x22") d_bits = 384;
356
+ else throw PDNSException("Unsupported EC key");
357
+ if (attr[1].str().length() != (d_bits*2/8 + 3)) throw PDNSException("EC Point data invalid");
358
d_ec_point = attr[1].str().substr(3);
359
} else {
360
throw PDNSException("Cannot load attributes for PCKS#11 public key " + d_label);
0 commit comments