eID middleware |

# be::portugal::eid::PTEID_Certificate Class Reference

Class that represent one certificate. More...

Inheritance diagram for be::portugal::eid::PTEID_Certificate:

List of all members.

## Public Member Functions

override void | Dispose ()
string | getLabel ()
| Return the label of the certificate.
uint | getID ()
| Return the id of the certificate.
PTEID_CertifStatus | getStatus ()
| Return the status of the certificate using default validation level (from config).
PTEID_CertifStatus | getStatus (PTEID_ValidationLevel crl, PTEID_ValidationLevel ocsp)
| Return the status of the certificate.
PTEID_CertifType | getType ()
| Return the type of the certificate.
PTEID_ByteArray | getCertData ()
| Return the content of the certificate.
void | getFormattedData (PTEID_ByteArray data)
| Return the content of the certificate without ending zero.
string | getSerialNumber ()
| Return the serial number of the certificate.
string | getOwnerName ()
| Return the name of the owner of the certificate.
string | getIssuerName ()
| Return the name of the issuer of the certificate.
string | getValidityBegin ()
| Return the validity begin date of the certificate.
string | getValidityEnd ()
| Return the validity end date of the certificate.
uint | getKeyLength ()
| Return the length of public/private key on the certificate.
bool | isRoot ()
| Return true if this is a root certificate.
bool | isTest ()
| Return the test status.
bool | isFromPteidValidChain ()
| Return true if the certificate chain end by the one of pteid root.
bool | isFromCard ()
| This certificate comes from the card.
PTEID_Certificate | getIssuer ()
| Return the issuer certificate.
uint | countChildren ()
| Return the number of children for this certificate.
PTEID_Certificate | getChildren (uint ulIndex)
| Return the children certificate (certificate that has been issued by this one).
PTEID_Crl | getCRL ()
| Return the crl of the certificate.
PTEID_OcspResponse | getOcspResponse ()
| Return the ocsp response object of the certificate.
PTEID_CertifStatus | verifyCRL (bool forceDownload)
| Verify the certificate trough CRL validation.
PTEID_CertifStatus | verifyCRL ()
| Verify the certificate trough CRL validation.
PTEID_CertifStatus | verifyOCSP ()
| Verify the certificate trough OCSP validation.

## Detailed Description

Class that represent one certificate.

## Member Function Documentation

uint be::portugal::eid::PTEID_Certificate::countChildren | ( |  | ) | `[inline]`

Return the number of children for this certificate.

override void be::portugal::eid::PTEID_Certificate::Dispose | ( |  | ) | `[inline, virtual]`

Reimplemented from be::portugal::eid::PTEID_Crypto.

PTEID_ByteArray be::portugal::eid::PTEID_Certificate::getCertData | ( |  | ) | `[inline]`

Return the content of the certificate.

PTEID_Certificate be::portugal::eid::PTEID_Certificate::getChildren | ( | uint | ulIndex | ) | `[inline]`

Return the children certificate (certificate that has been issued by this one).

Throw PTEID_ExParamRange exception if the index is out of range.

Parameters:

  | ulIndex | is the children index (the index for the first child is 0

)

PTEID_Crl be::portugal::eid::PTEID_Certificate::getCRL | ( |  | ) | `[inline]`

Return the crl of the certificate.

void be::portugal::eid::PTEID_Certificate::getFormattedData | ( | PTEID_ByteArray | data | ) | `[inline]`

Return the content of the certificate without ending zero.

uint be::portugal::eid::PTEID_Certificate::getID | ( |  | ) | `[inline]`

Return the id of the certificate.

PTEID_Certificate be::portugal::eid::PTEID_Certificate::getIssuer | ( |  | ) | `[inline]`

Return the issuer certificate.

If there is no issuer (root), PTEID_ExCertNoIssuer exception is thrown.

string be::portugal::eid::PTEID_Certificate::getIssuerName | ( |  | ) | `[inline]`

Return the name of the issuer of the certificate.

uint be::portugal::eid::PTEID_Certificate::getKeyLength | ( |  | ) | `[inline]`

Return the length of public/private key on the certificate.

string be::portugal::eid::PTEID_Certificate::getLabel | ( |  | ) | `[inline]`

Return the label of the certificate.

PTEID_OcspResponse be::portugal::eid::PTEID_Certificate::getOcspResponse | ( |  | ) | `[inline]`

Return the ocsp response object of the certificate.

string be::portugal::eid::PTEID_Certificate::getOwnerName | ( |  | ) | `[inline]`

Return the name of the owner of the certificate.

string be::portugal::eid::PTEID_Certificate::getSerialNumber | ( |  | ) | `[inline]`

Return the serial number of the certificate.

PTEID_CertifStatus be::portugal::eid::PTEID_Certificate::getStatus | ( | PTEID_ValidationLevel | crl,
|  | PTEID_ValidationLevel | ocsp |
| ) |  |  | `[inline]`

Return the status of the certificate.

PTEID_CertifStatus be::portugal::eid::PTEID_Certificate::getStatus | ( |  | ) | `[inline]`

Return the status of the certificate using default validation level (from config).

PTEID_CertifType be::portugal::eid::PTEID_Certificate::getType | ( |  | ) | `[inline]`

Return the type of the certificate.

string be::portugal::eid::PTEID_Certificate::getValidityBegin | ( |  | ) | `[inline]`

Return the validity begin date of the certificate.

string be::portugal::eid::PTEID_Certificate::getValidityEnd | ( |  | ) | `[inline]`

Return the validity end date of the certificate.

bool be::portugal::eid::PTEID_Certificate::isFromPteidValidChain | ( |  | ) | `[inline]`

Return true if the certificate chain end by the one of pteid root.

bool be::portugal::eid::PTEID_Certificate::isFromCard | ( |  | ) | `[inline]`

This certificate comes from the card.

bool be::portugal::eid::PTEID_Certificate::isRoot | ( |  | ) | `[inline]`

Return true if this is a root certificate.

bool be::portugal::eid::PTEID_Certificate::isTest | ( |  | ) | `[inline]`

Return the test status.

Returns:
  - true if test certificate
  - false if good one

PTEID_CertifStatus be::portugal::eid::PTEID_Certificate::verifyCRL | ( |  | ) | `[inline]`

Verify the certificate trough CRL validation.

PTEID_CertifStatus be::portugal::eid::PTEID_Certificate::verifyCRL | ( | bool | forceDownload | ) | `[inline]`

Verify the certificate trough CRL validation.

PTEID_CertifStatus be::portugal::eid::PTEID_Certificate::verifyOCSP | ( |  | ) | `[inline]`

Verify the certificate trough OCSP validation.