ERUCES::TEAdminCertificate
#include <teadmin_certificate.h>
The TEAdminCertificate class represents certificate administrative tasks and is derived from the TEAdmin class.
The TEAdminCertificate class
Inheritance
- Inherits ERUCES::TEAdmin
Public Member Functions
| Member | Description |
|---|---|
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
| Parameter | Description |
|---|---|
strCSR | A 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
| Parameter | Description |
|---|---|
certs | One 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
| Parameter | Description |
|---|---|
certs | One 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
| Parameter | Description |
|---|---|
certs | A 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
| Parameter | Description |
|---|---|
strDN | string of certificate request |
type | Type of algorithm. 0: ECC, 1: RSA |
kl_curve | Key length or curve id. RSA: default=2048 |
certName | certificate name |
certSize | Size 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
| Parameter | Description |
|---|---|
strDN | string of certificate request |
type | Type of algorithm. 0: ECC, 1: RSA |
kl_curve | Key length or curve id. RSA: default=2048 |
certName | certificate name |
Returns: Binary buffer of certificate chain
uint16_t getServerCertificates(_TESTD string &key, TEObjectContainer &certs)
The getServerCertificates method gets server certificates.
Parameters
| Parameter | Description |
|---|---|
key | string of key attribute of certificate store |
certs | server 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
| Parameter | Description |
|---|---|
key | string of key attribute of root certificate store |
certs | root 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
| Parameter | Description |
|---|---|
sid | An integer presenting the system ID. |
pid | An object representing the principal ID. |
certs | A TEObjectContainer object representing the certificates. |
Returns: An integer representing the number of certificates the principal ID is on.