Skip to main content

PISOFT::TESSLMutualAuthenticationContext

#include <teauthsslmctx.h>

The TESSLMutualAuthenticationContext class is for the management of TLS mutual authentication connections and PKCS 11,12 authentication.

The TESSLMutualAuthenticationContext represents an authentication context used for TLS Mutual connection and PKCS 11,12 authentication. This class is derived from TEAuthenticationContext class.

© Pi Soft, 2018-2026 · Tricryption Engine 8.1

Inheritance​

Public Member Functions​

MemberDescription
~TESSLMutualAuthenticationContext()The TESSLMutualAuthenticationContext destructor is the class destructor.
void setPKCS12(_TESTD string &filename, _TESTD string &password)The setPKCS12 method sets PKCS 12 file to context.
const _TESTD string & getCertChain() constThe getCertChain method retrieves the certificate chain.
const _TESTD string & getPrivateKey() constThe getPrivateKey method retrieves the private key.
void setServerAnchorFile(const _TESTD string &filename)The setServerAnchorFile method names the certificate the connection trusts the Key Server by, when the PKCS#12 chain does not carry the Key Server's CA. The connection verifies the Key Server's certificate chain against the self-signed certificates of this context's own chain plus this anchor, and refuses it otherwise. An anchor that is not self-signed pins that certificate.
const _TESTD string & getServerAnchor() constThe getServerAnchor method retrieves the anchor setServerAnchorFile read.
te_oid authenticate()The authenticate method performs authentication.
TEObject * clone() constThe clone method clones a TESSLMutualAuthenticationContext object.

Static Public Member Functions​

MemberDescription
std::unique_ptr< TESSLMutualAuthenticationContext > getInstance()The getInstance method creates a new TESSLMutualAuthenticationContext object.

Member Function Documentation​

~TESSLMutualAuthenticationContext()​

The TESSLMutualAuthenticationContext destructor is the class destructor.

void setPKCS12(_TESTD string &filename, _TESTD string &password)​

The setPKCS12 method sets PKCS 12 file to context.

Parameters

ParameterDescription
filenameA string representing the file containing the PKCS 12 certificate.
passwordA string representing the private key to the PKCS 12 certificate.

const _TESTD string & getCertChain() const​

The getCertChain method retrieves the certificate chain.

Returns: A string representing the certificate chain.

const _TESTD string & getPrivateKey() const​

The getPrivateKey method retrieves the private key.

Returns: A string representing the private key.

void setServerAnchorFile(const _TESTD string &filename)​

The setServerAnchorFile method names the certificate the connection trusts the Key Server by, when the PKCS#12 chain does not carry the Key Server's CA. The connection verifies the Key Server's certificate chain against the self-signed certificates of this context's own chain plus this anchor, and refuses it otherwise. An anchor that is not self-signed pins that certificate.

Parameters

ParameterDescription
filenameA string representing a file holding one or more X.509 certificates, PEM, or one DER certificate.

const _TESTD string & getServerAnchor() const​

The getServerAnchor method retrieves the anchor setServerAnchorFile read.

Returns: A string holding the anchor file's bytes; empty when none was named.

te_oid authenticate()​

The authenticate method performs authentication.

Returns: Returns a long integer representing the principal ID of the authenticated principal.

TEObject * clone() const​

The clone method clones a TESSLMutualAuthenticationContext object.

Returns: A cloned TESSLMutualAuthenticationContext object.

std::unique_ptr< TESSLMutualAuthenticationContext > getInstance()​

The getInstance method creates a new TESSLMutualAuthenticationContext object.

Returns: Returns a std::unique_ptr that owns the new TESSLMutualAuthenticationContext.