<html><head></head><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div><span></span></div><div>Hi Matt,</div><div id="yui_3_16_0_1_1448370974404_5725" dir="ltr">Yes I have seen them and am planning on using them. But the timestamp is embedded in the Authenticode signature as a PKCS7 signedData under OID 1.3.6.1.4.1.311.3.3.1. I have reached this oid but need to convert the PKCS7 signedData into a structure after which I will be able to use the ts apis.</div><div id="yui_3_16_0_1_1448370974404_5782" dir="ltr">After some debugging, I found that the version in the PKCS7 structure is 3. So I am now wondering if I need to use d2i_CMS_SignedData instead of d2i_PKCS7.</div><div id="yui_3_16_0_1_1448370974404_5781" dir="ltr"><br></div><div id="yui_3_16_0_1_1448370974404_5780" dir="ltr">Thanks,</div><div id="yui_3_16_0_1_1448370974404_5783" dir="ltr">Leena.<br>  </div><div id="yui_3_16_0_1_1448370974404_5586" style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div id="yui_3_16_0_1_1448370974404_5585" style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div id="yui_3_16_0_1_1448370974404_5751" dir="ltr"> <hr size="1" id="yui_3_16_0_1_1448370974404_5772"> <font id="yui_3_16_0_1_1448370974404_5784" face="Arial" size="2"> <b><span style="font-weight: bold;">From:</span></b> Matt Caswell <matt@openssl.org><br> <b><span style="font-weight: bold;">To:</span></b> openssl-users@openssl.org <br> <b><span style="font-weight: bold;">Sent:</span></b> Tuesday, November 24, 2015 3:00 PM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [openssl-users] Verifying Authenticode timestamp using openssl apis<br> </font> </div> <div class="y_msg_container" id="yui_3_16_0_1_1448370974404_5584"><br><br clear="none"><div class="qtdSeparateBR"><br><br></div><div class="yqt4826679500" id="yqtfd02844"><br clear="none">On 24/11/15 05:17, Leena Soman wrote:<br clear="none">> Hello,<br clear="none">> I am trying to verify the timestamp in a file signed using Authenticode.<br clear="none">> I have found that this timestamp is in the RFC3161 format.<br clear="none">> Using openssl apis, I have parsed the Authenticode signature and reached<br clear="none">> the oid 1.3.6.1.4.1.311.3.3.1. I have subsequently used the following apis :</div><br clear="none"><br clear="none">Am I right in understanding that you are attempting to use the OpenSSL<br clear="none">ASN.1 APIs to parse an RFC3161 response?<br clear="none"><br clear="none">Did you realise that OpenSSL has APIs that support RFC3161 directly? See<br clear="none">opensssl/ts.h as well as the "openssl ts" command line app.<br clear="none"><br clear="none">Matt<br clear="none">_______________________________________________<br clear="none">openssl-users mailing list<br clear="none">To unsubscribe: <a href="https://mta.openssl.org/mailman/listinfo/openssl-users" target="_blank" shape="rect">https://mta.openssl.org/mailman/listinfo/openssl-users</a><div class="yqt4826679500" id="yqtfd32406"><br clear="none"></div><br><br></div> </div> </div> </div></body></html>