diff options
author | Andy Polyakov <appro@openssl.org> | 2015-05-11 12:16:01 +0200 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2015-05-13 18:05:22 +0200 |
commit | 8a09500d9cc1bafcbafb4d18c1bf2238bf354171 (patch) | |
tree | 6641080ce7f0bd28d7db1d866104501e9477df3f /util/incore | |
parent | 0ae16722876a9e424a1abc2c5285268476d99c35 (diff) |
util/incore update that allows FINGERPRINT_premain-free build.
As for complementary fips.c modification. Goal is to ensure that
FIPS_signature does not end up in .bss segment, one guaranteed to
be zeroed upon program start-up. One would expect explicitly
initialized values to end up in .data segment, but it turned out
that values explicitly initialized with zeros can end up in .bss.
The modification does not affect program flow, because first byte
was the only one of significance [to FINGERPRINT_premain].
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
(cherry picked from commit 34f39b062c76fbd3082521b26edee7f53afc061d)
Diffstat (limited to 'util/incore')
-rwxr-xr-x | util/incore | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/util/incore b/util/incore index e6e6ecfd89..bb765b1966 100755 --- a/util/incore +++ b/util/incore @@ -382,7 +382,7 @@ if (!$legacy_mode) { } $FINGERPRINT_ascii_value - = $exe->Lookup("FINGERPRINT_ascii_value") or die; + = $exe->Lookup("FINGERPRINT_ascii_value"); } if ($FIPS_text_startX && $FIPS_text_endX) { @@ -439,9 +439,12 @@ $fingerprint = FIPS_incore_fingerprint(); if ($legacy_mode) { print unpack("H*",$fingerprint); -} else { +} elsif (defined($FINGERPRINT_ascii_value)) { seek(FD,$FINGERPRINT_ascii_value->{st_offset},0) or die "$!"; print FD unpack("H*",$fingerprint) or die "$!"; +} else { + seek(FD,$FIPS_signature->{st_offset},0) or die "$!"; + print FD $fingerprint or die "$!"; } close (FD); |