ERUCES::TEAdminCertificate
#include <teadmin_certificate.h>
The TEAdminCertificate class represents certificate administrative tasks and is derived from the TEAdmin class.
The TEAdminCertificate class
© Pi Soft, 2018-2026 · Tricryption Engine 8.1
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 |
Exceptions
| Exception | Description |
|---|---|
TEAdminException | if the Key Service cannot execute the signing request – for example the connection is not open, or the server rejects the algorithm, key length or curve. The originating engine error code and message are carried in the exception. An empty strDN is not an error: the call returns NULL and sets certSize to zero. |
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 |
Exceptions
| Exception | Description |
|---|---|
TEAdminException | if the Key Service cannot execute the signing request – for example the connection is not open, or the server rejects the algorithm, key length or curve. The originating engine error code and message are carried in the exception. |
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 |
Exceptions
| Exception | Description |
|---|---|
TEAdminException | if the server certificate store cannot be read under key, or the command fails. The originating engine error code and message are carried in the exception. |
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 |
Exceptions
| Exception | Description |
|---|---|
TEAdminException | if the root certificate store cannot be read under key, or the command fails. The originating engine error code and message are carried in the exception. |
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. |
Exceptions
| Exception | Description |
|---|---|
TEAdminException | if the certificates for the given system and principal id cannot be retrieved. The originating engine error code and message are carried in the exception. |
Returns: An integer representing the number of certificates the principal ID is on.