diff options
author | Richard Levitte <levitte@openssl.org> | 2020-02-07 09:09:50 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2020-02-10 10:22:32 +0100 |
commit | b0593c086dd303af31dc1e30233149978dd613c4 (patch) | |
tree | 39c6a88ed1614fc69603f47ac16946b573140bb5 | |
parent | f4dcc09ba71c0a51771311428c20634f574ccf12 (diff) |
PROV: Ensure the AlgorithmIdentifier registers in DSA signature impl
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 <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/11037)
-rw-r--r-- | providers/implementations/signature/dsa.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/providers/implementations/signature/dsa.c b/providers/implementations/signature/dsa.c index b2309ef510..72cf71927d 100644 --- a/providers/implementations/signature/dsa.c +++ b/providers/implementations/signature/dsa.c @@ -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; } |