class tcpsocket::X509Certificate

Represents an X509 Certificate object.

Child Classes

Represents an X509 Certificate object. This object provides access to an X509 certificate object.

This class has no child classes.

Public Methods

[more] X509Certificate(const X509Data* certificate)
Constructs an X509Certificate object from the masked X509Data structrure
[more] X509Certificate()
Constructs an empty X509Certificate holder.
[more]std::string getIssuerName()
Provides the Issuer Name
[more]std::string getNotAfter()
Provides the certificate not after date
[more]time_t getNotAfter_time_t()
Provides the Certificate Not After time value as a time_t
[more]std::string getNotBefore()
Provides the certificate not before date
[more]time_t getNotBefore_time_t()
Provides the Certificate Not Before time value as a time_t
[more]std::string getSerialNumber()
Providse the X509 certificate serial number
[more]std::string getSubjectName()
Provides the subject name
[more]void* getX509()
Provides a pointer to the X509 data structure
[more]X509Certificate::LoadResult loadDERFile(const std::string& filename)
Loads am X509 certificate from a DER file
[more]X509Certificate::LoadResult loadPEMFile(const std::string& filename, const char* password)
Loads am X509 certificate from a PEM file
[more]std::string toString()
Converts the certificate to a string
[more] ~X509Certificate()
Destroys the certificate object

Public Members

[more]enum LoadResult
Results of loading a certificate

Member Documentation


enum LoadResult
Results of loading a certificate


noError
no error occured


fileNotFound
the file was not found


X509Certificate ()
Constructs an empty X509Certificate holder. Use loadPEMFile() or loadDERFile() to initialize the certificate.
See Also:
PEMLoad(const std::string&)
DERLoad(const std::string&)


X509Certificate (const X509Data* certificate)
Constructs an X509Certificate object from the masked X509Data structrure
Parameters:
certificate - the source data


~X509Certificate ()
Destroys the certificate object


std::string getSerialNumber ()
Providse the X509 certificate serial number
Returns:
the X509 certificate serial number


std::string getIssuerName ()
Provides the Issuer Name
Returns:
the Issuer Name


std::string getSubjectName ()
Provides the subject name
Returns:
The subject name


std::string getNotBefore ()
Provides the certificate not before date
Returns:
The certificate not before date


std::string getNotAfter ()
Provides the certificate not after date
Returns:
The certificate not after date


time_t getNotBefore_time_t ()
Provides the Certificate Not Before time value as a time_t
Returns:
The Not Before time as a time_t


time_t getNotAfter_time_t ()
Provides the Certificate Not After time value as a time_t
Returns:
The Not After time as a time_t


std::string toString ()
Converts the certificate to a string
Returns:
The PEM string representation of the certificate


void* getX509 ()
Provides a pointer to the X509 data structure
Returns:
An OpenSSL X509* pointer cast to void*


X509Certificate::LoadResult loadPEMFile (const std::string& filename, const char* password)
Loads am X509 certificate from a PEM file
Parameters:
the - name of the file to load.
password - [optional] a password controlling access to the file.
Returns:
the success of loading the file


X509Certificate::LoadResult loadDERFile (const std::string& filename)
Loads am X509 certificate from a DER file
Parameters:
the - name of the file to load.
Returns:
the success of loading the file

Table of Contents HTML hierarchy of classes or Java


Safmq Documentation, copyright (c) 2004-2010 Matthew J. Battey, Licensed Under Apache License Ver 2.0
Powered By: Get SAFMQ: Store and Forward Message Queue at SourceForge.net. Fast, secure and Free Open Source software downloads