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