<div dir="ltr">During the final linking stage, when the shared object is built, the compiler is free to insert functions from compiled object files anywhere it sees fit in the final shared object's code segment.  The object file is fundamentally transformed by this process; information which was present in the original object file may or may not end up in the resulting shared object.  Although the machine code in the subroutines should be copied into the final shared object unmodified, the original object file is effectively gone and cannot be recovered.  Without the original object file, we cannot calculate its cryptographic hash.</div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div>"As long as politics is the shadow cast on society by big business, the attenuation of the shadow will not change the substance."</div><div><br></div>Dewey, J. (2008). <i>The later works of John Dewey, 1925 - 1953</i> (Volume 6, page 163). Carbondale, IL: Southern Illinois University Press.<br></div></div></div>
<br><div class="gmail_quote">On Mon, Mar 14, 2016 at 9:26 PM, Satya Das <span dir="ltr"><<a href="mailto:satya@attivonetworks.com" target="_blank">satya@attivonetworks.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div>
<p dir="auto">Hello Ethan,</p>
<p dir="auto">I am tweaking the centos rpmspec to use my fips object module.  That seems to be downloading source tar ball, patching etc.
</p>
<p dir="auto">Please note that the sha1 of the so is not so interesting as the embedded sha1 check inside so (when one calls FIPS_mode_set). Essentially if I can get the embedded sha1in the so, I can compare that with the sha1 I have as part of the object module
 I have built. I am assuming the embedded sha1 is that of fipscanister.o.</p>
<p dir="auto">Hope that makes sense ?</p>
<p dir="auto">Thanks.<br>
<br>
<br>
</p>
<p dir="auto">From: Ethan Rahn<br>
Sent: Monday, March 14, 6:11 PM<br>
Subject: Re: [openssl-users] Verifying the sha1 of fipscanister.o with what is embedded in libcrypto.so<br>
To: <a href="mailto:openssl-users@openssl.org" target="_blank">openssl-users@openssl.org</a><br>
</p>
<p dir="auto">Is there a reason why you cannot build it from a controlled build environment and record the hash of the final .so? 
<br>
</p>
<p dir="auto">It seems that it would be pretty non-trivial if not impossible to pull a .o file from a .so in the exact same format that it went in, such that you could check the hash. Being able to check if a .c file is in the same state in the .so afterwards
 seems pretty much impossible given all the things that would change in the code with compiling and linking in between the .c state and the final .so state.
<br>
</p>
<p dir="auto">On Mon, Mar 14, 2016 at 5:30 PM, Satya Das <<a href="mailto:satya@attivonetworks.com" target="_blank">satya@attivonetworks.com</a>> wrote:
</p>
<blockquote type="cite">
<p dir="auto">Hello,</p>
<p dir="auto"> </p>
<p dir="auto">I have a simple problem I am trying to solve. I have built a fips capable openssl shared object (.so). I also have the sha1 hash of the fipscanister.o in a file called fipscanister.o.sha1. I also have the sha1 hash of fips_premain.c in a file
 called fips_premain.c.sha1. In order to make sure the build is good, I want to make sure that the .so was indeed built with these versions of fipscanister.o and fips_premain.</p>
<p dir="auto"> </p>
<p dir="auto">Is there a way to do this ? I am on centos 6.6 x86_64 and linking to object module 2.0.11 from openssl 1.0.1e with patches.</p>
<p dir="auto"> </p>
<p dir="auto">Thanks<span class="HOEnZb"><font color="#888888"><br>
</font></span></p><span class="HOEnZb"><font color="#888888">
<p dir="auto">-- <br>
openssl-users mailing list <br>
To unsubscribe: <a href="https://mta.openssl.org/mailman/listinfo/openssl-users" target="_blank">
https</a><a href="https://mta.openssl.org/mailman/listinfo/openssl-users" target="_blank">://</a><a href="https://mta.openssl.org/mailman/listinfo/openssl-users" target="_blank">mta.openssl.org</a><a href="https://mta.openssl.org/mailman/listinfo/openssl-users" target="_blank">/mailman/</a><a href="https://mta.openssl.org/mailman/listinfo/openssl-users" target="_blank">listinfo</a><a href="https://mta.openssl.org/mailman/listinfo/openssl-users" target="_blank">/</a><a href="https://mta.openssl.org/mailman/listinfo/openssl-users" target="_blank">openssl-users</a>
<br>
</p>
</font></span></blockquote>
<p dir="auto"><br>
<br>
</p>
</div>

<br>--<br>
openssl-users mailing list<br>
To unsubscribe: <a href="https://mta.openssl.org/mailman/listinfo/openssl-users" rel="noreferrer" target="_blank">https://mta.openssl.org/mailman/listinfo/openssl-users</a><br>
<br></blockquote></div><br></div>