In the latest released version 41.0.7, comments to _rsa_sig_setup() say:

# Hash algorithm can be absent (None) to initialize the context without setting
# any message digest algorithm. This is currently only valid for the PKCS1v15
# padding type, where it means that the signature data is encoded/decoded
# as provided, without being wrapped in a DigestInfo structure.

Which sort of seems to indicate that passing algorithm=None to RSA sign() 
should work if padding=PKCS1v15, but you can't actually do this because you 
can't get through _calculate_digest_and_algorithm() which doesn't allow 
algorithm=None. Unless I'm missing something important here, this seems to be 
an inconsistency and most likely a bug as well.
_______________________________________________
Cryptography-dev mailing list
Cryptography-dev@python.org
https://mail.python.org/mailman/listinfo/cryptography-dev

Reply via email to