Re: C library verification of Key Usage

2010-09-14 Thread Paul Douglas
This worked... Thank you very much... -P> On 09/08/2010 02:27 PM, Dr. Stephen Henson wrote: On Tue, Sep 07, 2010, Paul Douglas wrote: Hi Everyone, I'm trying to figure out the required openssl c library calls to check/verify if a certificate supports Web Server Authentication. From t

Re: C library verification of Key Usage

2010-09-08 Thread Dr. Stephen Henson
On Tue, Sep 07, 2010, Paul Douglas wrote: > Hi Everyone, > > > I'm trying to figure out the required openssl c library calls to > check/verify if a certificate > supports Web Server Authentication. > > From the command line it looks like I could use > > openssl x509 -purpose -in ./certificate -n

Re: C library verification of Key Usage

2010-09-08 Thread Dr. Stephen Henson
On Wed, Sep 08, 2010, Patrick Patterson wrote: > Hi Paul: > > Where you can start looking at: > > X509_get_ext_by_NID() with NID_key_usage and NID_ext_key_usage > > And either parse out those extensions appropriately for their type > A better function is X509_get_ext_d2i() which will return a

Re: C library verification of Key Usage

2010-09-08 Thread Patrick Patterson
Hi Paul: Where you can start looking at: X509_get_ext_by_NID() with NID_key_usage and NID_ext_key_usage And either parse out those extensions appropriately for their type OR use X509_print_ex() and get the textual "pretty" form, and do careful string comparisons against the output. Remember:

C library verification of Key Usage

2010-09-08 Thread Paul Douglas
Hi Everyone, I'm trying to figure out the required openssl c library calls to check/verify if a certificate supports Web Server Authentication. From the command line it looks like I could use > openssl x509 -purpose -in ./certificate -noout and then check for: > SSL server : Yes I'd like t