Re: Getting hostname with openssl library

2009-10-20 Thread Victor B. Wagner
On 2009.10.19 at 17:40:11 -0400, Victor Duchovni wrote: On Mon, Oct 19, 2009 at 01:34:38PM -0500, William wrote: I am looking for the way to read a certificate from disk in C code and get the hostname (CN) inside that certificate in the C code using the openssl library. Sadly, a

Re: Getting hostname with openssl library

2009-10-20 Thread Peter Sylvester
A better question is to match a given hostname against a certificate and determine whether it obeys the https rules. There can be multiple hostnames and wild cards. The code implemented by curl is a complete way to do this. /PS

Re: Getting hostname with openssl library

2009-10-20 Thread Victor B. Wagner
On 2009.10.20 at 10:11:46 +0200, Peter Sylvester wrote: A better question is to match a given hostname against a certificate and determine whether it obeys the https rules. There can be multiple hostnames and wild cards. The code implemented by curl is a complete way to do this. Hmm,

Re: Getting hostname with openssl library

2009-10-20 Thread Victor Duchovni
On Tue, Oct 20, 2009 at 10:11:46AM +0200, Peter Sylvester wrote: A better question is to match a given hostname against a certificate and determine whether it obeys the https rules. There can be multiple hostnames and wild cards. The code implemented by curl is a complete way to do this.

Re: Getting hostname with openssl library

2009-10-20 Thread Peter Sylvester
It does not support subjectAltName extensions. SubjectAltName extension is supported since an eternity, more than 5 years ??? __ OpenSSL Project http://www.openssl.org User Support Mailing

Re: Getting hostname with openssl library

2009-10-20 Thread Victor Duchovni
On Tue, Oct 20, 2009 at 05:46:56PM +0200, Peter Sylvester wrote: It does not support subjectAltName extensions. SubjectAltName extension is supported since an eternity, more than 5 years ??? Oops, sorry, you are right, I failed to notice the code that does this just above the CN code. So,

Getting hostname with openssl library

2009-10-19 Thread William
I am looking for the way to read a certificate from disk in C code and get the hostname (CN) inside that certificate in the C code using the openssl library. __ OpenSSL Project

Re: Getting hostname with openssl library

2009-10-19 Thread Victor Duchovni
On Mon, Oct 19, 2009 at 01:34:38PM -0500, William wrote: I am looking for the way to read a certificate from disk in C code and get the hostname (CN) inside that certificate in the C code using the openssl library. Sadly, a rather complex task in general: - The subject DN could contain