Fix bug in pkcs11-tool (did not ASN.1-encode ECDSA-SHA-2 signature)
This commit is contained in:
parent
1efc73fa2f
commit
f0e703be49
|
@ -1670,7 +1670,7 @@ static void sign_data(CK_SLOT_ID slot, CK_SESSION_HANDLE session,
|
||||||
util_fatal("failed to open %s: %m", opt_output);
|
util_fatal("failed to open %s: %m", opt_output);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (opt_mechanism == CKM_ECDSA || opt_mechanism == CKM_ECDSA_SHA1) {
|
if (opt_mechanism == CKM_ECDSA || opt_mechanism == CKM_ECDSA_SHA1 || opt_mechanism == CKM_ECDSA_SHA256 || opt_mechanism == CKM_ECDSA_SHA384 || opt_mechanism == CKM_ECDSA_SHA512) {
|
||||||
if (opt_sig_format && (!strcmp(opt_sig_format, "openssl") || !strcmp(opt_sig_format, "sequence"))) {
|
if (opt_sig_format && (!strcmp(opt_sig_format, "openssl") || !strcmp(opt_sig_format, "sequence"))) {
|
||||||
unsigned char *seq;
|
unsigned char *seq;
|
||||||
size_t seqlen;
|
size_t seqlen;
|
||||||
|
|
Loading…
Reference in New Issue