Skip to main content

com.eruces.teadmin.CertificateAdmin

The CertificateAdmin class is for certificate administration.

Since: 3.1

© Pi Soft, 2018-2026 · Tricryption Engine 8.1

Inheritance

Static Public Attributes

TypeNameDescription
final intCERTIFICATE_ALGORITHM_ECCThe ECC algorithm.
final intCERTIFICATE_ALGORITHM_RSAThe RSA algorithm.

Public Member Functions

MemberDescription
CertificateAdmin()The CertificateAdmin constructor is the default class constructor.
CertObjectInfo[] addCAToTrustedCAList(CertObjectInfo[] certs)The addCAToTrustedCAList method adds one or more certificate authorities (CA) to the list of CAs.
void removeCAFromTrustedCAList(CertObjectInfo[] certs)The removeCAFromTrustedCAList method removes one or more certificate authorities from the list of trusted certificate authorities.
CertObjectInfo[] getTrustedCAList()The getTrustedCAList method gets a list of trusted certificate authorities.
Vector generateCertificateRequest(String[] strDNs)The generateCertificateRequest method generates certificate signing requests.
byte[] generateCertificateRequest(String strDN, int type, int kl_curve)The generateCertificateRequest method generates certificate signing request based on a peticular algorithm and key length or curve.
byte[] generateCertificateRequest(String strDN, int type, String kl_curve)The generateCertificateRequest method generates certificate signing request based on a peticular algorithm and key length or curve.
CertObjectInfo[] getCertObjectFromCertificate(Vector vecCerts)The getCertObjectFromCertificate method gets certificate objects using a vector of certificates.

Member Function Documentation

CertificateAdmin()

The CertificateAdmin constructor is the default class constructor.

CertObjectInfo[] addCAToTrustedCAList(CertObjectInfo[] certs)

The addCAToTrustedCAList method adds one or more certificate authorities (CA) to the list of CAs.

Parameters

ParameterDescription
certsAn array of certificate objects.

Exceptions

ExceptionDescription
teagent.TEAgentExceptionif the request cannot be completed on the connection, or the Key Service returns an error for it (delivered as a TEServerException).

Returns: Returns a list of CAs that have been added to the list of trusted CAs.

void removeCAFromTrustedCAList(CertObjectInfo[] certs)

The removeCAFromTrustedCAList method removes one or more certificate authorities from the list of trusted certificate authorities.

Parameters

ParameterDescription
certsAn array of certificate authority certificates to be removed.

Exceptions

ExceptionDescription
teagent.TEAgentExceptionif the request cannot be completed on the connection, or the Key Service returns an error for it (delivered as a TEServerException).

CertObjectInfo[] getTrustedCAList()

The getTrustedCAList method gets a list of trusted certificate authorities.

Exceptions

ExceptionDescription
teagent.TEAgentExceptionif the request cannot be completed on the connection, or the Key Service returns an error for it (delivered as a TEServerException).

Returns: Returns an array of trusted certificate authority certificates.

Vector generateCertificateRequest(String[] strDNs)

The generateCertificateRequest method generates certificate signing requests.

Parameters

ParameterDescription
strDNsAn array of string certificate requests.

Exceptions

ExceptionDescription
teagent.TEAgentExceptionif the request cannot be completed on the connection, or the Key Service returns an error for it (delivered as a TEServerException).

Returns: Returns a vector of certificate requests.

byte[] generateCertificateRequest(String strDN, int type, int kl_curve)

The generateCertificateRequest method generates certificate signing request based on a peticular algorithm and key length or curve.

Parameters

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

Exceptions

ExceptionDescription
teagent.TEAgentExceptionif the request cannot be completed on the connection, or the Key Service returns an error for it (delivered as a TEServerException).

Returns: Binary buffer of certificate request

See also: CERTIFICATE_ALGORITHM_ECC, CERTIFICATE_ALGORITHM_RSA

byte[] generateCertificateRequest(String strDN, int type, String kl_curve)

The generateCertificateRequest method generates certificate signing request based on a peticular algorithm and key length or curve.

Parameters

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

Exceptions

ExceptionDescription
teagent.TEAgentExceptionif the request cannot be completed on the connection, or the Key Service returns an error for it (delivered as a TEServerException).

Returns: Binary buffer of certificate request

See also: CERTIFICATE_ALGORITHM_ECC, CERTIFICATE_ALGORITHM_RSA

CertObjectInfo[] getCertObjectFromCertificate(Vector vecCerts)

The getCertObjectFromCertificate method gets certificate objects using a vector of certificates.

Parameters

ParameterDescription
vecCertsA vector of certificates.

Exceptions

ExceptionDescription
teagent.TEAgentExceptionif the request cannot be completed on the connection, or the Key Service returns an error for it (delivered as a TEServerException).

Returns: Returns certificate objects.