RSAPrivateKey certainly does have this method

I don't know why mypy fails to see it.
This commit is contained in:
Jean-Paul Calderone 2023-01-06 21:00:21 -05:00
parent 8c56ccad72
commit e893d06cb3

View File

@ -123,7 +123,7 @@ def der_string_from_signing_key(private_key: PrivateKey) -> bytes:
:returns: bytes representing `private_key` :returns: bytes representing `private_key`
""" """
_validate_private_key(private_key) _validate_private_key(private_key)
return private_key.private_bytes( return private_key.private_bytes( # type: ignore[attr-defined]
encoding=Encoding.DER, encoding=Encoding.DER,
format=PrivateFormat.PKCS8, format=PrivateFormat.PKCS8,
encryption_algorithm=NoEncryption(), encryption_algorithm=NoEncryption(),