pyopenssl icon indicating copy to clipboard operation
pyopenssl copied to clipboard

Inconsistent param type for digest

Open lovetox opened this issue 3 years ago • 0 comments

Hi,

Not a real big issue but something i found while looking at the code

Seems all digest need to be passed as str and get then converted to bytes except for the CRL class, where we need to pass it as bytes

Maybe something to consider when there is a major version with other breaking changes?

or to stay backwards compatible something like

if isinstance(digest, str):
    digest = _byte_string(digest)

could be added.

lovetox avatar Jan 25 '22 23:01 lovetox