SourcePro® 2024.1 |
SourcePro® API Reference Guide |
Adapter class for the cryptographic library's representation of an X.509 certificate. More...
#include <rw/secsock/RWX509Certificate.h>
Public Member Functions | |
RWX509Certificate (const char **certData, int numLines) | |
RWX509Certificate (std::istream &is) | |
RWCString | getIssuerNameString () const |
RWDateTime | getNotAfterDate () const |
RWDateTime | getNotBeforeDate () const |
int | getPublicKeyLength () const |
RWX509CertificateRep | getRep () const |
RWCString | getSerialNumber () const |
RWCString | getSubjectNameString () const |
long | getVersion () const |
bool | isValid (const RWDateTime &date=RWDateTime(RWDateTime::setCurrentTime)) const |
void | throwIfNotValid (const RWDateTime &date=RWDateTime(RWDateTime::setCurrentTime)) const |
Public Member Functions inherited from RWHandleBase | |
bool | isValid (void) const |
bool | operator!= (const RWHandleBase &second) const |
bool | operator== (const RWHandleBase &second) const |
Friends | |
class | RWSecureSocket |
Related Symbols | |
(Note that these are not member symbols.) | |
typedef X509 * | RWX509CertificateRep |
Additional Inherited Members | |
Protected Member Functions inherited from RWHandleBase | |
RWHandleBase (const RWHandleBase &second) | |
RWHandleBase (RWBodyBase *body) | |
RWHandleBase (RWStaticCtor) | |
RWHandleBase (void) | |
~RWHandleBase (void) | |
RWBodyBase & | body (void) const |
RWHandleBase & | operator= (const RWHandleBase &second) |
RWX509Certificate is an adapter for the cryptographic library's representation of an X.509 certificate. A certificate contains a public key and some information concerning the validity of the certificate. The certificate is digitally signed by the issuer to protect its integrity.
|
inline |
Constructs a certificate from the data pointed to by certData. certData is a pointer to an array of C-style strings that contain the PEM-encoded certificate. Each line of a PEM-encoded certificate is an element in the array of strings.
numLines is the number of lines in the certData array. For example, if you are passing the pointer certData as the first parameter to this constructor, you should pass sizeof(certData)/sizeof(certData[0]) as the second parameter to this constructor.
RWUnableToReadCertificateError | Thrown if the certificate is corrupted. |
RWSecureSocketUnderlyingAllocationError | Thrown if the cryptographic library is unsuccessful in allocating memory. |
|
inline |
Constructs a certificate from the istream
. The input stream should contain only one certificate.
This constructor reads from the istream
until an EOF is read. ifstream
instances automatically end transmissions with an EOF. For example, if you pass an RWPortalIStream that ultimately reads from a socket, the stream only enters the EOF state when the sending socket is closed.
RWUnableToReadCertificateError | Thrown if the certificate is corrupted. |
RWSecureSocketUnderlyingAllocationError | Thrown if the cryptographic library is unsuccessful in allocating memory. |
|
inline |
Returns an RWCString containing the individual components of the name of the issuer of the certificate, concatenated together.
|
inline |
Returns the date and time after which the certificate is not valid.
|
inline |
Returns the date and time before which the certificate is not valid.
|
inline |
Returns the number of bits in the subject's public key.
|
inline |
Returns a pointer to the cryptographic library's representation of the certificate.
|
inline |
Returns the serial number of the certificate.
|
inline |
Returns an RWCString object containing the individual components of the name, concatenated together.
|
inline |
Returns the certificate version number. The returned value is always one less than the certificate version. A value of 0
would indicate a certificate version 1.
|
inline |
Returns true
if the certificate is valid relative to the date/time false
otherwise. The parameter defaults to the current date/time.
|
inline |
RWCertificateNotValidError | Thrown if the certificate is not valid relative to the date/time. The date parameter defaults to the current date/time. |
|
related |
This is the internal X.509 certificate representation.
Copyright © 2024 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved. |