Verification of a x509 certificate signature

2013-11-27 Thread Dereck Hurtubise
Hello, I'm trying to verify an x509 certificate with a custom library (other than openssl) The reason I'm writing to this mailing list is that I can't figure out what is going wrong. The library is checked and nothing is wrong so I must be missing something. The program I'm writing has to be

Re: Verification of a x509 certificate signature

2013-11-27 Thread Dereck Hurtubise
The certificate is received in ASN.1 DER format. Not PEM. The only thing I want to do is verify the signature of the certificate, and thus verify the signature itself. It is self-signed so the public key in the certificate should be used to verify the signature, but it isn't working. Certificate:

Re: Verification of a x509 certificate signature

2013-11-28 Thread Dereck Hurtubise
:07 PM, Walter H. walte...@mathemainzel.infowrote: Hi, On Wed, November 27, 2013 16:02, Dereck Hurtubise wrote: X509v3 Extended Key Usage: Trust Root what is this strange? 'Trust Root' as Extended Key Usage

Re: Verification of a x509 certificate signature

2013-11-28 Thread Dereck Hurtubise
the OID is in the file. This should've been omitted from the data, but somehow didn't Thank you all for the help. On Thu, Nov 28, 2013 at 2:26 PM, Dereck Hurtubise djhurtub...@gmail.comwrote: It is NTP indicating that this certificate is held by a supposed trusted root (authority

Re: Bad OIDs (was: Re: Verification of a x509 certificate signature)

2013-11-28 Thread Dereck Hurtubise
a trustRoot EKU, without any OID being proposed or referenced. Your certificate includes the later one in the EKU extension. -- Erwann ABALEA Le 28/11/2013 14:26, Dereck Hurtubise a écrit : It is NTP indicating that this certificate is held by a supposed trusted root (authority

how to get a maximum digest length of a specific algorithm by nid

2013-12-12 Thread Dereck Hurtubise
Hello, Is there an easy way in OpenSSL to call some function which returns the length of the digest/hash it returns? Like SHA256 would return 32 (maximum digest length of 32 bytes). Dereck

What does RSA_public_encrypt use for hash and mgf

2013-12-12 Thread Dereck Hurtubise
Can someone tell me what hash algorithm the RSA_public_encrypt function uses? Is this SHA1 only for both? Dereck

Re: What does RSA_public_encrypt use for hash and mgf

2013-12-12 Thread Dereck Hurtubise
. This mode is recommended for all new applications. -- Ken Goldman kgold...@us.ibm.com 914-945-2415 (862-2415) From:Dereck Hurtubise djhurtub...@gmail.com To:openssl-users@openssl.org Date:12/12/2013 07:55 AM Subject:What does RSA_public_encrypt use

Re: how to get a maximum digest length of a specific algorithm by nid

2013-12-12 Thread Dereck Hurtubise
How do you use EVP_MD_size() if the only thing you have is the NID of the algorithm? On Thu, Dec 12, 2013 at 5:59 PM, Michel msa...@paybox.com wrote: Did you see EVP_MD_size() at http://www.openssl.org/docs/crypto/EVP_DigestInit.html Le 12/12/2013 09:29, Dereck Hurtubise a écrit

Re: openssl RSA public key does not match key read from C code

2014-01-06 Thread Dereck Hurtubise
There is currently a parsing bug when converting from PEM to DER. I encountered this as well, but with DSA keys. I suppose the same bug occurs with RSA keys. In DSA the G component gets copied to the pub component when converting from PEM to DER. From DER to PEM works fine. Regards, Dereck