If the files are stored locally in a directory, then you can specify to the CTX 
the hash directory ( X509_STORE_load_locations(store,hashdir,rootfile) ), but 
you need to name your certificate file(s) with the hash of the subject name of 
the certificate. Or you could implement your own method: for each file in 
directory, read it into X509 and compare issuer name, serial number and hash 
value, but this is exactly what openssl does with hashdir :)


----- Original Message ----
From: Olivia Hudson <[EMAIL PROTECTED]>
To: openssl-users@openssl.org
Sent: Thursday, June 19, 2008 8:21:15 PM
Subject: Given a certificate (PKC#7 format) how can you determine the root 
certificate file name


I'm writing code in C++ and to validate a certificate I need to verify it's 
chain back to the root certificate.
The method that validates the certificate also needs the root certificate file 
name. How can
I determine the root certificate file name for a given certificate? I know the 
directory where root certificates
are stored but I need to determine which root certificate is associated with a 
given certificate.
Any help would be much appreciated.
 
thanks,
Olivia


      

Reply via email to