Skip to main content

ERUCES::TEAdminCertificate

#include <teadmin_certificate.h>

The TEAdminCertificate class represents certificate administrative tasks and is derived from the TEAdmin class.

The TEAdminCertificate class

Inheritance

Public Member Functions

MemberDescription
TEAdminCertificate()The TEAdminCertificate constructor is the default class constructor.
~TEAdminCertificate()The TEAdminCertificate destructor is the class destructor.
TECertObjectInfo issueCertificate(const _TESTD string &strCSR)The issueCertificate method issues a certificate.
void addCAToTrustedCAList(const TEObjectContainer &certs)The addCAToTrustedCAList method adds a certificate authority (CA) to the list of trusted certificate authorities.
void removeCAFromTrustedCAList(const TEObjectContainer &certs)The removeCAFromTrustedCAList method removes a certificate authority (CA) from a list of trusted certificate authorities.
void getTrustedCAList(TEObjectContainer &certs)The getTrustedCAList method gets a list of trusted certificate authorities.
unsigned char * generateCertificate(_TESTD string &strDN, uint32_t type, uint32_t kl_curve, _TESTD string &certName, size_t *certSize)The generateCertificate method generates certificate requests based on particular algorithm and key length or curve.
_TESTD string generateCertificate(_TESTD string &strDN, uint32_t type, uint32_t kl_curve, _TESTD string &certName)The generateCertificate method generates certificate requests based on particular algorithm and key length or curve.
uint16_t getServerCertificates(_TESTD string &key, TEObjectContainer &certs)The getServerCertificates method gets server certificates.
uint16_t getRootCertificates(_TESTD string &key, TEObjectContainer &certs)The getRootCertificates method gets the root certificates.
uint32_t getPrincipalCertificates(uint32_t sid, te_oid pid, TEObjectContainer &certs)The getPrincipalCertificates gets the Transport Principal certificates.

Member Function Documentation

TEAdminCertificate()

The TEAdminCertificate constructor is the default class constructor.

~TEAdminCertificate()

The TEAdminCertificate destructor is the class destructor.

TECertObjectInfo issueCertificate(const _TESTD string &strCSR)

The issueCertificate method issues a certificate.

Parameters

ParameterDescription
strCSRA string representing a certificate request.

Returns: Returns a TECertObjectInfo object.

void addCAToTrustedCAList(const TEObjectContainer &certs)

The addCAToTrustedCAList method adds a certificate authority (CA) to the list of trusted certificate authorities.

Parameters

ParameterDescription
certsOne or more certificate authorities to be added; must be TECertObjectInfo objects.

void removeCAFromTrustedCAList(const TEObjectContainer &certs)

The removeCAFromTrustedCAList method removes a certificate authority (CA) from a list of trusted certificate authorities.

Parameters

ParameterDescription
certsOne or more certificate authorities to be removed; must be TECertObjectInfo objects.

void getTrustedCAList(TEObjectContainer &certs)

The getTrustedCAList method gets a list of trusted certificate authorities.

Parameters

ParameterDescription
certsA container to hold the returned CA certificates; must be TECertObjectInfo objects.

unsigned char * generateCertificate(_TESTD string &strDN, uint32_t type, uint32_t kl_curve, _TESTD string &certName, size_t *certSize)

The generateCertificate method generates certificate requests based on particular algorithm and key length or curve.

Parameters

ParameterDescription
strDNstring of certificate request
typeType of algorithm. 0: ECC, 1: RSA
kl_curveKey length or curve id. RSA: default=2048
certNamecertificate name
certSizeSize of certificate buffer returned

Returns: Binary buffer of certificate chain

_TESTD string generateCertificate(_TESTD string &strDN, uint32_t type, uint32_t kl_curve, _TESTD string &certName)

The generateCertificate method generates certificate requests based on particular algorithm and key length or curve.

Parameters

ParameterDescription
strDNstring of certificate request
typeType of algorithm. 0: ECC, 1: RSA
kl_curveKey length or curve id. RSA: default=2048
certNamecertificate name

Returns: Binary buffer of certificate chain

uint16_t getServerCertificates(_TESTD string &key, TEObjectContainer &certs)

The getServerCertificates method gets server certificates.

Parameters

ParameterDescription
keystring of key attribute of certificate store
certsserver certificates returned

Returns: An integer representing the number of server certificates returned

uint16_t getRootCertificates(_TESTD string &key, TEObjectContainer &certs)

The getRootCertificates method gets the root certificates.

Parameters

ParameterDescription
keystring of key attribute of root certificate store
certsroot certificates returned

Returns: An integer representing the number of root certificates returned

uint32_t getPrincipalCertificates(uint32_t sid, te_oid pid, TEObjectContainer &certs)

The getPrincipalCertificates gets the Transport Principal certificates.

Parameters

ParameterDescription
sidAn integer presenting the system ID.
pidAn object representing the principal ID.
certsA TEObjectContainer object representing the certificates.

Returns: An integer representing the number of certificates the principal ID is on.