Skip to content

Commit

Permalink
sm-eac: mark cryptographic mechanism field as optional and fix asn.1 …
Browse files Browse the repository at this point in the history
…encode error in encode_mse_cdata during terminal authentication. Fixes #2726
  • Loading branch information
Marco Hünseler authored and frankmorgner committed Mar 9, 2023
1 parent 7aa06c1 commit a97e702
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sm/sm-eac.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ static int encode_mse_cdata(struct sc_context *ctx, int protocol,

struct sc_asn1_entry capdu_eac_mse[] = {
{ "Cryptographic mechanism reference",
SC_ASN1_OCTET_STRING, SC_ASN1_CTX|0x00, 0, NULL, NULL },
SC_ASN1_OCTET_STRING, SC_ASN1_CTX|0x00, SC_ASN1_OPTIONAL, NULL, NULL },
{ "Reference of a public key / secret key",
SC_ASN1_OCTET_STRING, SC_ASN1_CTX|0x03, SC_ASN1_OPTIONAL, NULL, NULL },
{ "Reference of a private key / Reference for computing a session key",
Expand Down

0 comments on commit a97e702

Please sign in to comment.