d2i_X509_CINF:asn1 length mismatch

2007-07-16 Thread Sanal Pillai
Hi, I am trying to use Openssl 0.9.4 with my application and trying to load a CA certificate ".pem". It gaves me a error. am trying to add a trusted list of CA's , for that reading the certificate from a file and storing it... but got this error. Error reading cert from \My Documents\servercert.p

RE: newbie: set cert time validity

2007-07-16 Thread David Schwartz
thanks a lot for your lenghty explanation, David Schwartz. I really appreciate it for you to help me explain all this. I noted you said that what I did might be sensible if three things are the case: 1) The locale you are using the certificate has no daylight savings time. 2) The certifica

Re: newbie: set cert time validity

2007-07-16 Thread imin noob
thanks a lot for your lenghty explanation, David Schwartz. I really appreciate it for you to help me explain all this. I noted you said that what I did might be sensible if three things are the case: 1) The locale you are using the certificate has no daylight savings time. 2) The certificate isn't

RE: cross platform issues with openssl-fips

2007-07-16 Thread David Schwartz
> I built OpenSSL with the FIPS module, and after a few issues built it > successfully on Solaris 10 (using Sun cc) and on Windows using MinGW. > Each works fine on its own platform, but if I encrypt on Solaris 10, I > get decryption errors on Windows, and vice versa. > > Any ideas? Did you do a

policy and constraints support

2007-07-16 Thread Bin Lu
Hi, Anybody knows are certificate policies and policy constraints extensions supported and if yes, from which release ? 'supported' here I mean X509_supported_extension() returns '1' . 0.9.8d has policy constraints support but somehow this call still returns '0'. Regards, binlu _

Re: cross platform issues with openssl-fips

2007-07-16 Thread Elia, Leonard F.
|Thank you for looking at this :) | |= Encrypting on Windows C:\test>\ssl\bin\openssl enc -aes128 -in test.odt -out test98.odt.aes (OpenSSL 0.9.8e 23 Feb 2007) | | C:\test>\ssl\bin\openssl enc -aes128 -in test.odt -out test97.odt.aes (OpenSSL 0.9.7m-fips 23 Feb 2007)| |Cross-decryption

Re: cross platform issues with openssl-fips

2007-07-16 Thread Thomas J. Hruska
Elia, Leonard F. wrote: Hello All, I built OpenSSL with the FIPS module, and after a few issues built it successfully on Solaris 10 (using Sun cc) and on Windows using MinGW. Each works fine on its own platform, but if I encrypt on Solaris 10, I get decryption errors on Windows, and vice versa.

cross platform issues with openssl-fips

2007-07-16 Thread Elia, Leonard F.
Hello All, I built OpenSSL with the FIPS module, and after a few issues built it successfully on Solaris 10 (using Sun cc) and on Windows using MinGW. Each works fine on its own platform, but if I encrypt on Solaris 10, I get decryption errors on Windows, and vice versa. Any ideas? Leonard El

EC

2007-07-16 Thread C K KIRAN-KNTX36
Hi All, I am using elliptic curves. And, I am setting the value of private key filed in EC_KEY structure before calling EC_KEY_generate_key. Every time I am getting different values of the public key. I need a help. In, W=sG. Where, W is the public key S is the private key and G is the base point

Printing value stored in ASN1_TYPE

2007-07-16 Thread Chaz.
I needed to have a routine to convert the data stored in an ASN1_TYPE structure to an ASCII string. After finding that no one on the net seemed to have the answer I went and did some research. This is what I came up with for an answer. If any one sees anything wrong with it I would love to know abo

RE: newbie: set cert time validity

2007-07-16 Thread David Schwartz
hold on! thanks a lot I managed to get it to 23:59:59. all i had to do was change the value strcpy(buf+6, "235959Z"); to strcpy(buf+6, "155959Z"); I would not do that. There is no way you can know that 15:59:59 will correspond to 24:59:59 in the future when the certificate expires. You ar

Re: newbie: set cert time validity

2007-07-16 Thread imin macho
erm... but there's still one problem. where in IssueCertificate should I add the line X509_gmtime_roundup(X509_get_notAfter(x)); ? because currently the line is only added in renewCertificate... as I can't see where in IssueCertificate can I add those lines.. thanks again On 7/16/07, David Schwar

Re: newbie: set cert time validity

2007-07-16 Thread imin macho
hold on! thanks a lot I managed to get it to 23:59:59. all i had to do was change the value strcpy(buf+6, "235959Z"); to strcpy(buf+6, "155959Z"); thanks again, David Schwartz! You're a great help!! On 7/16/07, David Schwartz <[EMAIL PROTECTED]> wrote: I added the X509_gmtime_roundup(X509_

Re: newbie: set cert time validity

2007-07-16 Thread imin macho
I see... does this mean I can't make it to expire at 23:59:59 for the particular day? This is the UTC/GMT time for which area...? hmm.. actly i'm still confused... anyway it's ok then if I can't make it that way. Is there any way I can convince my boss that (besides sending him a copy of this ema

RE: newbie: set cert time validity

2007-07-16 Thread David Schwartz
I added the X509_gmtime_roundup(X509_get_notAfter(x)); at my renewCertificate function. When I renewed the cert valid to for example, to 31/7/2007, the cert valid to will be strangely changed to '1/8/2007 7:59:59". May I know which part should I alter here? There is nothing to change, as it

Re: newbie: set cert time validity

2007-07-16 Thread imin macho
Thanks a lot for your help, David Schwartz! I haven't got it correctly yet, but with your help I could see I'm moving somewhere here. I added the X509_gmtime_roundup(X509_get_notAfter(x)); at my renewCertificate function. When I renewed the cert valid to for example, to 31/7/2007, the cert valid

RE: newbie: set cert time validity

2007-07-16 Thread David Schwartz
This function rounds an ASN1_UTCTIME up to the end of the day it belongs to. You need to call this function on an ASN1_UTCTIME before you set it as the 'not valid after' date: void X509_gmtime_roundup(ASN1_UTCTIME *s) { /* Rounds an ASN1_UTCTIME up to the end of the current day */ char buf[32];