22 #include "../../Exception.h"
24 #ifdef WIN32 //hack for win32 build
27 #include <openssl/x509.h>
56 static X509* copyX509(X509* cert)
throw(
IOException);
57 static X509* loadX509(
const std::string& path)
throw(
IOException);
60 std::vector<
unsigned char> encodeDER() const throw(IOException);
61 std::
string getSerial() const throw(IOException);
62 X509_NAME* getIssuerNameAsn1() const;
63 std::
string getIssuerName(const std::
string &obj = "") const throw(IOException);
64 std::vector<KeyUsage> getKeyUsage() const throw(IOException);
65 std::vector<std::
string> getCertificatePolicies() const throw(IOException);
66 std::
string getSubjectName(const std::
string &obj = "") const throw(IOException);
67 std::vector<
unsigned char> getRsaModulus() const throw(IOException);
68 std::vector<
unsigned char> getRsaExponent() const throw(IOException);
70 X509* getX509() const throw(IOException);
72 bool isValid() const throw(IOException);
73 bool verify() const throw(IOException);
75 int compareIssuerToString(const std::
string &name) const throw(IOException);
78 bool operator ==(const
X509Cert &other) const;
81 EVP_PKEY* getPublicKey() const throw(IOException);
82 std::
string toString(X509_NAME *name, const std::
string &obj) const throw(IOException);