Skip to content
Open
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
4 changes: 2 additions & 2 deletions Makefile.pre.in
Original file line number Diff line number Diff line change
Expand Up @@ -1581,8 +1581,8 @@ $(LIBHACL_BLAKE2_LIB_STATIC): $(LIBHACL_BLAKE2_OBJS)

Modules/_hacl/Hacl_HMAC.o: $(srcdir)/Modules/_hacl/Hacl_HMAC.c $(LIBHACL_HMAC_HEADERS)
$(CC) -c $(LIBHACL_CFLAGS) -o $@ $(srcdir)/Modules/_hacl/Hacl_HMAC.c
Modules/_hacl/Hacl_Streaming_HMAC.o: $(srcdir)/Modules/_hacl/Hacl_Streaming_HMAC.c $(LIBHACL_HMAC_HEADERS)
$(CC) -Wno-unused-variable -c $(LIBHACL_CFLAGS) -o $@ $(srcdir)/Modules/_hacl/Hacl_Streaming_HMAC.c
Modules/_hacl/Hacl_Streaming_HMAC.o: $(srcdir)/Modules/_hmac_hacl.c $(srcdir)/Modules/_hacl/Hacl_Streaming_HMAC.c $(LIBHACL_HMAC_HEADERS)
$(CC) -Wno-unused-variable -c $(LIBHACL_CFLAGS) -o $@ $(srcdir)/Modules/_hmac_hacl.c
$(LIBHACL_HMAC_LIB_STATIC): $(LIBHACL_HMAC_OBJS)
-rm -f $@
$(AR) $(ARFLAGS) $@ $(LIBHACL_HMAC_OBJS)
Expand Down
11 changes: 11 additions & 0 deletions Modules/_hmac_hacl.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/* Compile the HACL* streaming HMAC implementation with explicit SIMD defaults. */
#include "_hacl/internal/Hacl_Streaming_HMAC.h"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would rather prefer that this file is put in the _hacl folder next to refresh.sh or update the sh script instead if necessary. We already have some namespace hacking for HACL


#ifndef HACL_CAN_COMPILE_VEC128
# define HACL_CAN_COMPILE_VEC128 0
#endif
#ifndef HACL_CAN_COMPILE_VEC256
# define HACL_CAN_COMPILE_VEC256 0
#endif

#include "_hacl/Hacl_Streaming_HMAC.c"
2 changes: 1 addition & 1 deletion PCbuild/pythoncore.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@
<ClCompile Include="..\Modules\_hacl\Hacl_Hash_SHA2.c" />
<ClCompile Include="..\Modules\_hacl\Hacl_Hash_SHA3.c" />
<ClCompile Include="..\Modules\_hacl\Hacl_HMAC.c" />
<ClCompile Include="..\Modules\_hacl\Hacl_Streaming_HMAC.c" />
<ClCompile Include="..\Modules\_hmac_hacl.c" />
<ClCompile Include="..\Modules\_hacl\Lib_Memzero0.c" />
<ClCompile Include="..\Modules\_hacl\Hacl_Hash_Blake2b.c" />
<ClCompile Include="..\Modules\_hacl\Hacl_Hash_Blake2s.c" />
Expand Down
2 changes: 1 addition & 1 deletion PCbuild/pythoncore.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -1028,7 +1028,7 @@
<ClCompile Include="..\Modules\_hacl\Hacl_HMAC.c">
<Filter>Modules</Filter>
</ClCompile>
<ClCompile Include="..\Modules\_hacl\Hacl_Streaming_HMAC.c">
<ClCompile Include="..\Modules\_hmac_hacl.c">
<Filter>Modules</Filter>
</ClCompile>
<ClCompile Include="..\Modules\_heapqmodule.c">
Expand Down
Loading