Re: [openssl-users] i2d_X509_SIG() in FIPS mode

2015-02-06 Thread Gayathri Manoj
Thanks Steve for looking into this. Earlier I have tested the same way and no values came in der. 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

Re: [openssl-users] i2d_X509_SIG() in FIPS mode

2015-02-05 Thread Dr. Stephen Henson
On Thu, Feb 05, 2015, Gayathri Manoj wrote: > > Tried with above method and its not worked. Please let me know is it > possible to use NID_md5WithRSAEncryption, NID_md5 in fips mode. > I threw together a quick test program and it has no problems for me. Let me know if it doesn't work for yo

Re: [openssl-users] i2d_X509_SIG() in FIPS mode

2015-02-05 Thread Dr. Stephen Henson
On Thu, Feb 05, 2015, Gayathri Manoj wrote: > Hi All, > > Tried with above method and its not worked. Please let me know is it > possible to use NID_md5WithRSAEncryption, NID_md5 in fips mode. > You can use the OID and encode structures using it: the ASN.1 code is not part of the FIPS modul

Re: [openssl-users] i2d_X509_SIG() in FIPS mode

2015-02-05 Thread Gayathri Manoj
Hi All, Tried with above method and its not worked. Please let me know is it possible to use NID_md5WithRSAEncryption, NID_md5 in fips mode. Thanks, Gayathri On Wed, Feb 4, 2015 at 8:56 PM, Dr. Stephen Henson wrote: > On Tue, Feb 03, 2015, Gayathri Manoj wrote: > > > Hi Steve, Viktor, > >

Re: [openssl-users] i2d_X509_SIG() in FIPS mode

2015-02-04 Thread Dr. Stephen Henson
On Tue, Feb 03, 2015, Gayathri Manoj wrote: > Hi Steve, Viktor, > > I have tried with len also, But this also causing seg fault. > my requiremnt is to store max 2048 bit keys. Hence I used length as 512 > +1. > currently i ma getting len value = 28514. > > X509_SIG sig; > X509_ALGOR algor; >

Re: [openssl-users] i2d_X509_SIG() in FIPS mode

2015-02-04 Thread Jakob Bohm
On 03/02/2015 06:26, Gayathri Manoj wrote: Hi Steve, Viktor, I have tried with len also, But this also causing seg fault. my requiremnt is to store max 2048 bit keys. Hence I used length as 512 +1. currently i ma getting len value = 28514. X509_SIG sig; X509_ALGOR algor; ASN1_OCTET_STRING

Re: [openssl-users] i2d_X509_SIG() in FIPS mode

2015-02-02 Thread Gayathri Manoj
Hi Steve, Viktor, I have tried with len also, But this also causing seg fault. my requiremnt is to store max 2048 bit keys. Hence I used length as 512 +1. currently i ma getting len value = 28514. X509_SIG sig; X509_ALGOR algor; ASN1_OCTET_STRING digest; ASN1_TYPE parameter; ASN1_item_dige

Re: [openssl-users] i2d_X509_SIG() in FIPS mode

2015-02-02 Thread Viktor Dukhovni
On Mon, Feb 02, 2015 at 07:15:12PM +0530, Gayathri Manoj wrote: > unsigned char *ptr, *tmp=NULL; > X509_SIG sig; > How is "sig" initialized? > len=i2d_X509_SIG(sig,NULL); > tmp = (unsigned char*) malloc(513); Why 513 and not len? What is the value of len? > ptr=tmp; > i2d_X509_SIG(&sig,

Re: [openssl-users] i2d_X509_SIG() in FIPS mode

2015-02-02 Thread Dr. Stephen Henson
On Mon, Feb 02, 2015, Gayathri Manoj wrote: > Hi Steve, > > unsigned char *ptr, *tmp=NULL; > X509_SIG sig; > > len=i2d_X509_SIG(sig,NULL); > tmp = (unsigned char*) malloc(513); > ptr=tmp; > i2d_X509_SIG(&sig, &ptr); // here causing problem. > Well you should really malloc 'len' bytes as

Re: [openssl-users] i2d_X509_SIG() in FIPS mode

2015-02-02 Thread Gayathri Manoj
Hi Steve, unsigned char *ptr, *tmp=NULL; X509_SIG sig; len=i2d_X509_SIG(sig,NULL); tmp = (unsigned char*) malloc(513); ptr=tmp; i2d_X509_SIG(&sig, &ptr); // here causing problem. Thanks, Gayathri On Mon, Feb 2, 2015 at 6:38 PM, Dr. Stephen Henson wrote: > On Mon, Feb 02, 2015, Gayathri

Re: [openssl-users] i2d_X509_SIG() in FIPS mode

2015-02-02 Thread Dr. Stephen Henson
On Mon, Feb 02, 2015, Gayathri Manoj wrote: > Hi All, > > Please let me know shall I need to take care the memory separately for the > fips mode. > Only in FIPS mode i am getting the below error while calling i2d_x509_sig(). > I'm not sure how that can happen. The function i2d_X509_SIG isn't pa

Re: [openssl-users] i2d_X509_SIG() in FIPS mode

2015-02-02 Thread Gayathri Manoj
Hi All, Please let me know shall I need to take care the memory separately for the fips mode. Only in FIPS mode i am getting the below error while calling i2d_x509_sig(). Program received signal SIGSEGV, Segmentation fault. 0x00d9d045 in __memcpy_ssse3_rep () from /lib/libc.so.6 Thanks, Gayathri

[openssl-users] i2d_X509_SIG() in FIPS mode

2015-01-30 Thread Gayathri Manoj
Hi All, I am getting segfault while using i2d_X509_SIG() in FIPS mode. (gdb) bt #0 0x01f95045 in __memcpy_ssse3_rep () from /lib/libc.so.6 #1 0x00466837 in asn1_ex_i2c () from /usr/local/cm/lib/libcrypto.so.1.0.1 #2 0x00466a36 in asn1_i2d_ex_primitive () from /usr/local/cm/lib/libcrypto.so.1.0.