Skip to content

Commit

Permalink
pkcs15-prkey.c: correctly check for presence of ECC parameters
Browse files Browse the repository at this point in the history
closes #3031
  • Loading branch information
hamarituc authored and Jakuje committed Feb 21, 2024
1 parent 748bae4 commit ba6e078
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libopensc/pkcs15-prkey.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ int sc_pkcs15_decode_prkdf_entry(struct sc_pkcs15_card *p15card,
else if (asn1_prkey[1].flags & SC_ASN1_PRESENT) {
obj->type = SC_PKCS15_TYPE_PRKEY_EC;
#ifdef ENABLE_OPENSSL
if (!info.field_length && ec_domain_len) {
if (!(asn1_ecckey_attr[1].flags & SC_ASN1_PRESENT) && (asn1_ecckey_attr[3].flags & SC_ASN1_PRESENT)) {
const unsigned char *p = ec_domain;
ASN1_OBJECT *object = d2i_ASN1_OBJECT(NULL, &p, ec_domain_len);
int nid;
Expand Down

0 comments on commit ba6e078

Please sign in to comment.