Public Member Functions | |
| SiCertificateVerifier () | |
| default constructor | |
| virtual | ~SiCertificateVerifier () |
| destructor | |
| OFCondition | addTrustedCertificateFile (const char *fileName, int fileType) |
| loads a certificate from a file and adds it to the pool of trusted certificates. | |
| OFCondition | addTrustedCertificateDir (const char *pathName, int fileType) |
| loads all files as certificates from the specified directory and adds them to the pool of trusted certificates. | |
| OFCondition | addCertificateRevocationList (const char *fileName, int fileType) |
| loads a certificate revocation list (CRL) in X.509 format from a file and adds it to the pool of trusted certificates and CRLs. | |
| OFCondition | verifyCertificate (SiCertificate &certificate) |
| verifies a certificate against the known trusted CA certificates and certificate revocation lists. | |
| const char * | lastError () const |
| returns an error string containing a textual description of the result of the last call to verifyCertificate() if that call returned SI_EC_VerificationFailed_NoTrust. | |
Private Member Functions | |
| SiCertificateVerifier (SiCertificateVerifier &arg) | |
| private undefined copy constructor | |
| SiCertificateVerifier & | operator= (SiCertificateVerifier &arg) |
| private undefined copy assignment operator | |
Private Attributes | |
| X509_STORE * | x509store |
| OpenSSL X.509 certificate store. | |
| long | errorCode |
| OpenSSL X.509 certificate verification error code for the last operation. | |
Definition at line 44 of file sicertvf.h.
| OFCondition SiCertificateVerifier::addTrustedCertificateFile | ( | const char * | fileName, | |
| int | fileType | |||
| ) |
loads a certificate from a file and adds it to the pool of trusted certificates.
| fileName | path to the certificate file | |
| filetype | file format: X509_FILETYPE_PEM or X509_FILETYPE_ASN1 |
| OFCondition SiCertificateVerifier::addTrustedCertificateDir | ( | const char * | pathName, | |
| int | fileType | |||
| ) |
loads all files as certificates from the specified directory and adds them to the pool of trusted certificates.
| fileName | path to the directory containing certificate files | |
| filetype | file format: X509_FILETYPE_PEM or X509_FILETYPE_ASN1 |
| OFCondition SiCertificateVerifier::addCertificateRevocationList | ( | const char * | fileName, | |
| int | fileType | |||
| ) |
loads a certificate revocation list (CRL) in X.509 format from a file and adds it to the pool of trusted certificates and CRLs.
| fileName | path to the CRL file | |
| filetype | file format: X509_FILETYPE_PEM or X509_FILETYPE_ASN1 |
| OFCondition SiCertificateVerifier::verifyCertificate | ( | SiCertificate & | certificate | ) |
verifies a certificate against the known trusted CA certificates and certificate revocation lists.
Returns a status flag and stores a detailed error description that can be retrieved with lastError().
| certificate | the certificate to verify |
| const char* SiCertificateVerifier::lastError | ( | ) | const |
returns an error string containing a textual description of the result of the last call to verifyCertificate() if that call returned SI_EC_VerificationFailed_NoTrust.