Re: X509 digest different after write and read to-from PEM

2005-10-25 Thread M G
Dr. Henson, Looks like the check on the >0 and not just != -1 did the trick! Thank you for helping me! Cheers! --- "Dr. Stephen Henson" <[EMAIL PROTECTED]> wrote: > On Tue, Oct 25, 2005, M G wrote: > > > Hi Dr. Henson, > > > > You were wondering what code I used to produce the > > digest: I

Re: X509 digest different after write and read to-from PEM

2005-10-25 Thread Dr. Stephen Henson
On Tue, Oct 25, 2005, M G wrote: > Hi Dr. Henson, > > You were wondering what code I used to produce the > digest: I used my X509 certificate to get the > fingerprint with GetSHAFingerprint() - then I wrote > the X509 to PEM, then I read it back and called > GetSHAFingerprint() again and receive

Re: X509 digest different after write and read to-from PEM

2005-10-25 Thread M G
Hi Dr. Henson, You were wondering what code I used to produce the digest: I used my X509 certificate to get the fingerprint with GetSHAFingerprint() - then I wrote the X509 to PEM, then I read it back and called GetSHAFingerprint() again and received a different fingerprint. Is this supposed to

Re: X509 digest different after write and read to-from PEM

2005-10-24 Thread M G
This is the code I used: (after the generate function code shown earlier in this thread - I have an m_pX509) - this is what I do with it:    m_strPEMText = X509ToPEM(m_pX509); m_strFingerprint = GetSHAFingerprint(m_pX509); ::MessageBox(NULL, m_strFingerprint, "ORIGINAL FINGERPRINT", MB_OK);   // cr

Re: X509 digest different after write and read to-from PEM

2005-10-23 Thread Rich Salz
If there is a difference as small as one bit then the digests should be different. /r$ -- Rich Salz Chief Security Architect DataPower Technology http://www.datapower.com This address will be going away; please use [EMAIL PROTECTED] ___

Re: X509 digest different after write and read to-from PEM

2005-10-23 Thread Dr. Stephen Henson
On Sun, Oct 23, 2005, M G wrote: > Hi Dr. Henson, > > Thanks in advance for taking a look: Here is my code that creates the > certificate (I removed the checks on return values - they were fine) > > m_pX509 = X509_new(); > > X509_set_version(m_pX509, 2); > X509_gmtime_adj(X509_get_notBefor

Re: X509 digest different after write and read to-from PEM

2005-10-23 Thread M G
Hi Dr. Henson,   Thanks in advance for taking a look:  Here is my code that creates the certificate (I removed the checks on return values - they were fine)   m_pX509 = X509_new();   X509_set_version(m_pX509, 2); X509_gmtime_adj(X509_get_notBefore(m_pX509),0); X509_gmtime_adj(X509_get_notAfter(m_pX

Re: X509 digest different after write and read to-from PEM

2005-10-22 Thread Dr. Stephen Henson
On Sat, Oct 22, 2005, M G wrote: > Hi list, > > I noticed that the DER string representation was very very similar (longer by > one byte) and only different by very few bytes... i.e., they are almost > exactly the same thing I am trying to get to the cause of why the digest > differs bet

X509 digest different after write and read to-from PEM

2005-10-22 Thread M G
Hi list,   I noticed that the DER string representation was very very similar (longer by one byte) and only different by very few bytes... i.e., they are almost exactly the same thing  I am trying to get to the cause of why the digest differs between them   Any ideas? Find your next car at Y