<div dir="ltr"><div><div><div>Thanks Steve for looking into this. Earlier I have tested the same  way and no values  came in der.<br></div><br></div>Finally i find out the crash reason. For getting digest we have used ASN1_item_digest() and in this we have passed  digest type as EVP_MD5() which is not allowed in fips and its not thrown any error.  And got return value of this api as SUCCESS. Later i changed this to EVP_sha1() and able to get the value in i2d_X509_SIG().<br><br></div><div>Thanks,<br></div><div>Gayathri <br></div><div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 5, 2015 at 7:21 PM, Dr. Stephen Henson <span dir="ltr"><<a href="mailto:steve@openssl.org" target="_blank">steve@openssl.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Thu, Feb 05, 2015, Gayathri Manoj wrote:<br>
<br>
><br>
</span><span class="">> Tried with  above method and its not worked. Please let me know  is it<br>
> possible to use  NID_md5WithRSAEncryption, NID_md5  in fips mode.<br>
><br>
<br>
</span>I threw together a quick test program and it has no problems for me. Let<br>
me know if it doesn't work for you.<br>
<br>
#include <stdio.h><br>
#include <openssl/x509.h><br>
#include <openssl/bio.h><br>
<br>
main()<br>
{<br>
int len;<br>
unsigned char *der = NULL;<br>
BIO *out;<br>
X509_SIG *sig = X509_SIG_new();<br>
FIPS_mode_set(1);<br>
printf("Fips mode is %d\n", FIPS_mode());<br>
X509_ALGOR_set0(sig->algor, OBJ_nid2obj(NID_md5), V_ASN1_NULL, NULL);<br>
ASN1_STRING_set(sig->digest, "Hello World", -1);<br>
len = i2d_X509_SIG(sig, &der);<br>
out = BIO_new_fp(stdout, BIO_NOCLOSE);<br>
ASN1_parse(out, der, len, 0);<br>
<div class="HOEnZb"><div class="h5">}<br>
<br>
Steve.<br>
--<br>
Dr Stephen N. Henson. OpenSSL project core developer.<br>
Commercial tech support now available see: <a href="http://www.openssl.org" target="_blank">http://www.openssl.org</a><br>
_______________________________________________<br>
openssl-users mailing list<br>
To unsubscribe: <a href="https://mta.openssl.org/mailman/listinfo/openssl-users" target="_blank">https://mta.openssl.org/mailman/listinfo/openssl-users</a><br>
</div></div></blockquote></div><br></div>