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_notBefore(m_pX509),0);
> X509_gmtime_adj(X509_get_notAfter(m_pX509), (long)60*60*24*nDaysValid);
> X509_set_pubkey(m_pX509, pEVP);
>  
> X509_NAME * pName = X509_get_subject_name(m_pX509);
> X509_NAME_add_entry_by_txt(pName, "C", MBSTRING_ASC,szC,-1,-1,0);
> X509_NAME_add_entry_by_txt(pName, "C", MBSTRING_ASC,szO,-1,-1,0);
> X509_NAME_add_entry_by_txt(pName,"CN",MBSTRING_ASC,szCN,-1,-1,0);
>  
> // self signed:
> X509_set_issuer_name(m_pX509, pName);
>  
> X509_sign(m_pX509, pEVP, EVP_sha1());
>  
> That is all I do... Am I missing something important?
>  
> Thank you very much!
> 

After adding a couple of lines of code to print out the digest of the
certificate and dump it as DER I still get exactly the same results.

What code are you using to produce the digest?

Steve.
--
Dr Stephen N. Henson. Email, S/MIME and PGP keys: see homepage
OpenSSL project core developer and freelance consultant.
Funding needed! Details on homepage.
Homepage: http://www.drh-consultancy.demon.co.uk
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to