DH: have DH_set_length() increment the dirty count.
authorRichard Levitte <levitte@openssl.org>
Thu, 15 Oct 2020 05:14:16 +0000 (07:14 +0200)
committerRichard Levitte <levitte@openssl.org>
Mon, 19 Oct 2020 10:14:11 +0000 (12:14 +0200)
The recommended private key length is a key parameter among other key
parameters, and is included in the key data transferred in an import
or export between legacy implementations and provider implementations.

Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/13166)

crypto/dh/dh_lib.c

index e6eba34ac9cbee32fa948e1db54990afeef27292..6280472ade4e7bc6abc112eb63671c729060a234 100644 (file)
@@ -243,6 +243,7 @@ long DH_get_length(const DH *dh)
 int DH_set_length(DH *dh, long length)
 {
     dh->length = length;
+    dh->dirty_cnt++;
     return 1;
 }