]> granicus.if.org Git - openssl/commitdiff
util/incore update.
authorAndy Polyakov <appro@openssl.org>
Mon, 20 Apr 2015 13:53:12 +0000 (15:53 +0200)
committerAndy Polyakov <appro@openssl.org>
Wed, 13 May 2015 15:23:48 +0000 (17:23 +0200)
Support cross-compile platforms that don't support FINGERPRINT_premain,
e.g. VxWorks.

Reviewed-by: Richard Levitte <levitte@openssl.org>
util/incore

index e6e6ecfd8928158a3a7ffda3daae51c5f104795a..bb765b1966bd0bba1f14e4cabca072a41dcaf36f 100755 (executable)
@@ -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);