]> granicus.if.org Git - python/commit
bpo-9216: Add usedforsecurity to hashlib constructors (GH-16044)
authorChristian Heimes <christian@python.org>
Fri, 13 Sep 2019 00:30:00 +0000 (02:30 +0200)
committerGregory P. Smith <greg@krypto.org>
Fri, 13 Sep 2019 00:30:00 +0000 (19:30 -0500)
commit7cad53e6b084435a220e6604010f1fa5778bd0b1
treea54b4906b9e9fc18bd5319fe87ad8a7fc071b3a7
parent3a4f66707e824ef3a8384827590ebaa6ca463dc0
bpo-9216: Add usedforsecurity to hashlib constructors (GH-16044)

The usedforsecurity keyword only argument added to the hash constructors is useful for FIPS builds and similar restrictive environment with non-technical requirements that legacy algorithms be forbidden by their implementations without being explicitly annotated as not being used for any security related purposes.  Linux distros with FIPS support benefit from this being standard rather than making up their own way(s) to do it.

Contributed and Signed-off-by: Christian Heimes christian@python.org
20 files changed:
Doc/library/hashlib.rst
Lib/test/test_hashlib.py
Lib/uuid.py
Misc/NEWS.d/next/Library/2019-09-12-14-54-45.bpo-9216.W7QMpC.rst [new file with mode: 0644]
Modules/_blake2/blake2b_impl.c
Modules/_blake2/blake2s_impl.c
Modules/_blake2/clinic/blake2b_impl.c.h
Modules/_blake2/clinic/blake2s_impl.c.h
Modules/_hashopenssl.c
Modules/_sha3/clinic/sha3module.c.h
Modules/_sha3/sha3module.c
Modules/clinic/_hashopenssl.c.h
Modules/clinic/md5module.c.h
Modules/clinic/sha1module.c.h
Modules/clinic/sha256module.c.h
Modules/clinic/sha512module.c.h
Modules/md5module.c
Modules/sha1module.c
Modules/sha256module.c
Modules/sha512module.c