Gives access to X.509 certificate underlying structure.

This commit is contained in:
Vincent Richard 2013-02-05 10:08:46 +01:00
parent ee62dcb0a6
commit 1da9117fa5
5 changed files with 21 additions and 0 deletions

View File

@ -82,6 +82,12 @@ X509Certificate_GnuTLS::~X509Certificate_GnuTLS()
} }
void* X509Certificate_GnuTLS::getInternalData()
{
return &m_data->cert;
}
// static // static
ref <X509Certificate> X509Certificate::import(utility::inputStream& is) ref <X509Certificate> X509Certificate::import(utility::inputStream& is)
{ {

View File

@ -151,6 +151,12 @@ X509Certificate_OpenSSL::~X509Certificate_OpenSSL()
} }
void* X509Certificate_OpenSSL::getInternalData()
{
return &m_data->cert;
}
// static // static
ref <X509Certificate> X509Certificate_OpenSSL::importInternal(X509* cert) ref <X509Certificate> X509Certificate_OpenSSL::importInternal(X509* cert)
{ {

View File

@ -65,6 +65,13 @@ public:
* false otherwise * false otherwise
*/ */
virtual bool equals(ref <const certificate> other) const = 0; virtual bool equals(ref <const certificate> other) const = 0;
/** Returns a pointer to internal binary data for this certificate.
* The actual type of data depends on the library used for TLS support.
*
* @return pointer to underlying data
*/
virtual void* getInternalData() = 0;
}; };

View File

@ -75,6 +75,7 @@ public:
const string getType() const; const string getType() const;
int getVersion() const; int getVersion() const;
bool equals(ref <const certificate> other) const; bool equals(ref <const certificate> other) const;
void* getInternalData();
private: private:

View File

@ -81,6 +81,7 @@ public:
const string getType() const; const string getType() const;
int getVersion() const; int getVersion() const;
bool equals(ref <const certificate> other) const; bool equals(ref <const certificate> other) const;
void* getInternalData();
private: private: