Loading e_os.h +5 −3 Original line number Diff line number Diff line Loading @@ -306,7 +306,7 @@ static unsigned int _strlen31(const char *str) # undef isupper # undef isxdigit # endif # if defined(_MSC_VER) && !defined(_DLL) && defined(stdin) # if defined(_MSC_VER) && !defined(_WIN32_WCE) && !defined(_DLL) && defined(stdin) # if _MSC_VER>=1300 # undef stdin # undef stdout Loading @@ -332,8 +332,10 @@ static unsigned int _strlen31(const char *str) # endif # endif # endif # if !defined(OPENSSL_FIPSCANISTER) # include <io.h> # include <fcntl.h> # endif # ifdef OPENSSL_SYS_WINCE # define OPENSSL_NO_POSIX_IO Loading fips/sha/Makefile +2 −1 Original line number Diff line number Diff line Loading @@ -30,7 +30,8 @@ LIB=$(TOP)/libcrypto.a LIBSRC=fips_sha1_selftest.c LIBOBJ=fips_sha1_selftest.o SRC= $(LIBSRC) fips_standalone_sha1.c SRC= $(LIBSRC) PROGS= fips_standalone_sha1.c EXHEADER= HEADER= Loading test/Makefile +1 −0 Original line number Diff line number Diff line Loading @@ -12,6 +12,7 @@ PERL= perl # KRB5 stuff KRB5_INCLUDES= LIBKRB5= TEST= fips_algvs.c PEX_LIBS= EX_LIBS= #-lnsl -lsocket Loading util/fipslink.pl +29 −16 Original line number Diff line number Diff line Loading @@ -27,33 +27,30 @@ if (exists $ENV{"PREMAIN_DSO_EXE"}) $fips_premain_dso = ""; } my $fips_sig = $ENV{"FIPS_SIG"}; if (defined $fips_sig) { if ($fips_premain_dso ne "") { $fips_premain_dso = "$fips_sig -dso"; } else { $fips_premain_dso = "$fips_sig -exe"; } } check_hash($sha1_exe, "fips_premain.c"); check_hash($sha1_exe, "fipscanister.lib"); print "Integrity check OK\n"; if (is_premain_linked(@ARGV)) { print "$fips_cc $fips_cc_args $fips_libdir/fips_premain.c\n"; system "$fips_cc $fips_cc_args $fips_libdir/fips_premain.c"; die "First stage Compile failure" if $? != 0; } elsif (!defined($ENV{FIPS_SIG})) { die "no fips_premain.obj linked"; } print "$fips_link @ARGV\n"; system "$fips_link @ARGV"; die "First stage Link failure" if $? != 0; if (defined($ENV{FIPS_SIG})) { print "$ENV{FIPS_SIG} $fips_target\n"; system "$ENV{FIPS_SIG} $fips_target"; die "$ENV{FIPS_SIG} $fips_target failed" if $? != 0; exit; } print "$fips_premain_dso $fips_target\n"; system("$fips_premain_dso $fips_target >$fips_target.sha1"); Loading @@ -74,6 +71,22 @@ print "$fips_link @ARGV\n"; system "$fips_link @ARGV"; die "Second stage Link failure" if $? != 0; sub is_premain_linked { return 1 if (grep /fips_premain\.obj/,@_); foreach (@_) { if (/^@(.*)/ && -f $1) { open FD,$1 or die "can't open $1"; my $ret = (grep /fips_premain\.obj/,<FD>)?1:0; close FD; return $ret; } } return 0; } sub check_hash { my ($sha1_exe, $filename) = @_; Loading util/mk1mf.pl +3 −3 Original line number Diff line number Diff line Loading @@ -864,13 +864,13 @@ if ($fips) } $rules.=&cc_compile_target("\$(OBJ_D)${o}fips_standalone_sha1$obj", "fips${o}sha${o}fips_standalone_sha1.c", "\$(SHLIB_CFLAGS)"); "\$(APP_CFLAGS)"); $rules.=&cc_compile_target("\$(OBJ_D)${o}\$(E_PREMAIN_DSO)$obj", "fips${o}fips_premain.c", "-DFINGERPRINT_PREMAIN_DSO_LOAD \$(SHLIB_CFLAGS)"); "-DFINGERPRINT_PREMAIN_DSO_LOAD \$(APP_CFLAGS)"); $rules.=&cc_compile_target("\$(OBJ_D)${o}fips_algvs$obj", "test${o}fips_algvs.c", "\$(SHLIB_CFLAGS)"); "\$(APP_CFLAGS)"); } foreach (values %lib_nam) Loading Loading
e_os.h +5 −3 Original line number Diff line number Diff line Loading @@ -306,7 +306,7 @@ static unsigned int _strlen31(const char *str) # undef isupper # undef isxdigit # endif # if defined(_MSC_VER) && !defined(_DLL) && defined(stdin) # if defined(_MSC_VER) && !defined(_WIN32_WCE) && !defined(_DLL) && defined(stdin) # if _MSC_VER>=1300 # undef stdin # undef stdout Loading @@ -332,8 +332,10 @@ static unsigned int _strlen31(const char *str) # endif # endif # endif # if !defined(OPENSSL_FIPSCANISTER) # include <io.h> # include <fcntl.h> # endif # ifdef OPENSSL_SYS_WINCE # define OPENSSL_NO_POSIX_IO Loading
fips/sha/Makefile +2 −1 Original line number Diff line number Diff line Loading @@ -30,7 +30,8 @@ LIB=$(TOP)/libcrypto.a LIBSRC=fips_sha1_selftest.c LIBOBJ=fips_sha1_selftest.o SRC= $(LIBSRC) fips_standalone_sha1.c SRC= $(LIBSRC) PROGS= fips_standalone_sha1.c EXHEADER= HEADER= Loading
test/Makefile +1 −0 Original line number Diff line number Diff line Loading @@ -12,6 +12,7 @@ PERL= perl # KRB5 stuff KRB5_INCLUDES= LIBKRB5= TEST= fips_algvs.c PEX_LIBS= EX_LIBS= #-lnsl -lsocket Loading
util/fipslink.pl +29 −16 Original line number Diff line number Diff line Loading @@ -27,33 +27,30 @@ if (exists $ENV{"PREMAIN_DSO_EXE"}) $fips_premain_dso = ""; } my $fips_sig = $ENV{"FIPS_SIG"}; if (defined $fips_sig) { if ($fips_premain_dso ne "") { $fips_premain_dso = "$fips_sig -dso"; } else { $fips_premain_dso = "$fips_sig -exe"; } } check_hash($sha1_exe, "fips_premain.c"); check_hash($sha1_exe, "fipscanister.lib"); print "Integrity check OK\n"; if (is_premain_linked(@ARGV)) { print "$fips_cc $fips_cc_args $fips_libdir/fips_premain.c\n"; system "$fips_cc $fips_cc_args $fips_libdir/fips_premain.c"; die "First stage Compile failure" if $? != 0; } elsif (!defined($ENV{FIPS_SIG})) { die "no fips_premain.obj linked"; } print "$fips_link @ARGV\n"; system "$fips_link @ARGV"; die "First stage Link failure" if $? != 0; if (defined($ENV{FIPS_SIG})) { print "$ENV{FIPS_SIG} $fips_target\n"; system "$ENV{FIPS_SIG} $fips_target"; die "$ENV{FIPS_SIG} $fips_target failed" if $? != 0; exit; } print "$fips_premain_dso $fips_target\n"; system("$fips_premain_dso $fips_target >$fips_target.sha1"); Loading @@ -74,6 +71,22 @@ print "$fips_link @ARGV\n"; system "$fips_link @ARGV"; die "Second stage Link failure" if $? != 0; sub is_premain_linked { return 1 if (grep /fips_premain\.obj/,@_); foreach (@_) { if (/^@(.*)/ && -f $1) { open FD,$1 or die "can't open $1"; my $ret = (grep /fips_premain\.obj/,<FD>)?1:0; close FD; return $ret; } } return 0; } sub check_hash { my ($sha1_exe, $filename) = @_; Loading
util/mk1mf.pl +3 −3 Original line number Diff line number Diff line Loading @@ -864,13 +864,13 @@ if ($fips) } $rules.=&cc_compile_target("\$(OBJ_D)${o}fips_standalone_sha1$obj", "fips${o}sha${o}fips_standalone_sha1.c", "\$(SHLIB_CFLAGS)"); "\$(APP_CFLAGS)"); $rules.=&cc_compile_target("\$(OBJ_D)${o}\$(E_PREMAIN_DSO)$obj", "fips${o}fips_premain.c", "-DFINGERPRINT_PREMAIN_DSO_LOAD \$(SHLIB_CFLAGS)"); "-DFINGERPRINT_PREMAIN_DSO_LOAD \$(APP_CFLAGS)"); $rules.=&cc_compile_target("\$(OBJ_D)${o}fips_algvs$obj", "test${o}fips_algvs.c", "\$(SHLIB_CFLAGS)"); "\$(APP_CFLAGS)"); } foreach (values %lib_nam) Loading