Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make openssl deterministic. #2182

Closed
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
2 changes: 2 additions & 0 deletions pkgs/development/libraries/openssl/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ let
# cannot be overriden per-process. For security, the
# environment variable is ignored for setuid binaries.
./cert-file.patch
# Remove the compilation time from the library
./no-date-in-library.patch
]

++ stdenv.lib.optionals (isCross && opensslCrossSystem == "hurd-x86")
Expand Down
12 changes: 12 additions & 0 deletions pkgs/development/libraries/openssl/no-date-in-library.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff -ur openssl-1.0.1f.orig/crypto/Makefile openssl-1.0.1f/crypto/Makefile
--- openssl-1.0.1f.orig/crypto/Makefile 2014-01-06 15:35:56.000000000 +0100
+++ openssl-1.0.1f/crypto/Makefile 2014-04-09 13:05:28.071346204 +0200
@@ -57,7 +57,7 @@
echo ' /* auto-generated by crypto/Makefile for crypto/cversion.c */'; \
echo ' #define CFLAGS "$(CC) $(CFLAG)"'; \
echo ' #define PLATFORM "$(PLATFORM)"'; \
- echo " #define DATE \"`LC_ALL=C LC_TIME=C date`\""; \
+ echo " #define DATE \"Thu Jan 1 00:00:01 UTC 1970\""; \
echo '#endif' ) >buildinf.h

x86cpuid.s: x86cpuid.pl perlasm/x86asm.pl