Skip to content

Commit

Permalink
PROV: Ensure the AlgorithmIdentifier registers in DSA signature impl
Browse files Browse the repository at this point in the history
When setting up the hash function for DSA signature, the encoded
AlgorithmIdentifier for the DSA+hash combination is queried, but not
stored, which leads to problems when signing ASN.1 items in libcrypto.

Reviewed-by: Shane Lontis <[email protected]>
(Merged from openssl#11037)
  • Loading branch information
levitte committed Feb 10, 2020
1 parent f4dcc09 commit b0593c0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions providers/implementations/signature/dsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ static int dsa_setup_md(PROV_DSA_CTX *ctx,

ctx->md = md;
OPENSSL_strlcpy(ctx->mdname, mdname, sizeof(ctx->mdname));
memcpy(ctx->aid, algorithmidentifier, algorithmidentifier_len);
ctx->aid_len = algorithmidentifier_len;
}
return 1;
}
Expand Down

0 comments on commit b0593c0

Please sign in to comment.