On 01/12/2021 19:07, Jeremy Harris wrote:
Another DH problem: I have a PEM for which DH_bits() says 512. https://www.openssl.org/docs/man3.0/man3/DH_bits.html has EVP_PKEY_get_bits() as a see-also, but that returns 4096. Is it more likely I've mis-loaded the file (via a BIO), or is EVP_PKEY_get_bits() something different? It's doc talks about the key in the pkey, which is suspiciously far from the DH params...
EVP_PKEY_get_bits() should be equivalent to DH_bits() (for a DH file). I would definitely double-check that you are not mis-loading something. If the problem persists then you might want to raise a github issue.
Matt