gh-131876: Revert "gh-131876: extract `_hashlib` helpers into a separate directory (#136995) by picnixz · Pull Request #137307 · python/cpython · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 7 additions & 30 deletions Makefile.pre.in

This file was deleted.

65 changes: 0 additions & 65 deletions Modules/_hashlib/hashlib_buffer.c

This file was deleted.

48 changes: 0 additions & 48 deletions Modules/_hashlib/hashlib_buffer.h

This file was deleted.

19 changes: 0 additions & 19 deletions Modules/_hashlib/hashlib_fetch.h

This file was deleted.

82 changes: 0 additions & 82 deletions Modules/_hashlib/hashlib_mutex.h

This file was deleted.

15 changes: 6 additions & 9 deletions Modules/_hashopenssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,14 @@

#include "Python.h"
#include "pycore_hashtable.h"
#include "pycore_strhex.h" // _Py_strhex()
#include "pycore_pyatomic_ft_wrappers.h" // FT_ATOMIC_LOAD_PTR_RELAXED

#include "_hashlib/hashlib_buffer.h"
#include "_hashlib/hashlib_fetch.h"
#include "_hashlib/hashlib_mutex.h"
#include "pycore_strhex.h" // _Py_strhex()
#include "pycore_pyatomic_ft_wrappers.h" // FT_ATOMIC_LOAD_PTR_RELAXED
#include "hashlib.h"

/* EVP is the preferred interface to hashing in OpenSSL */
#include <openssl/evp.h>
#include <openssl/hmac.h>
#include <openssl/crypto.h> // FIPS_mode()
#include <openssl/crypto.h> // FIPS_mode()
/* We use the object interface to discover what hashes OpenSSL supports. */
#include <openssl/objects.h>
#include <openssl/err.h>
Expand Down Expand Up @@ -535,7 +532,7 @@ raise_unsupported_algorithm_error(_hashlibstate *state, PyObject *digestmod)
{
raise_unsupported_algorithm_impl(
state->unsupported_digestmod_error,
_Py_HASHLIB_UNSUPPORTED_ALGORITHM,
HASHLIB_UNSUPPORTED_ALGORITHM,
digestmod
);
}
Expand All @@ -545,7 +542,7 @@ raise_unsupported_str_algorithm_error(_hashlibstate *state, const char *name)
{
raise_unsupported_algorithm_impl(
state->unsupported_digestmod_error,
_Py_HASHLIB_UNSUPPORTED_STR_ALGORITHM,
HASHLIB_UNSUPPORTED_STR_ALGORITHM,
name
);
}
Expand Down
8 changes: 3 additions & 5 deletions Modules/blake2module.c
Loading
Loading