BLPAPI C++ 3.26.6
Loading...
Searching...
No Matches
Component blpapi_tlsoptions

Detailed Description

Maintain client credentials and trust material.

Purpose:
Maintain client credentials and trust material.
Classes:
blpapi::TlsOptionsuser specified TLS options.
See also
Component blpapi_sessionoptions
Description:
TlsOptions instances maintain client credentials and trust material used by a session to establish secure mutually authenticated connections to endpoints.
The client credentials comprise an encrypted private key with a client certificate. The trust material comprises one or more certificates.
TlsOptions objects are created using the methods TlsOptions::createFromBlobs and TlsOptions::createFromFiles; both accept the DER encoded client credentials in PKCS#12 format and the DER encoded trusted material in PKCS#7 format.
Usage:
The following snippet shows to use the TlsOptions when creating a SessionOptions.
blpapi::TlsOptions tlsOptionsFromFiles
"mypassword",
"trusted");
tlsOptionsFromFiles.setTlsHandshakeTimeoutMs(123456);
SessionOptions sessionOptions1;
sessionOptions1.setTlsOptions(tlsOptionsFromFiles);
std::string credentials = getCredentials();
std::string password = getPassword();
std::string trustedCerts = getCerts();
blpapi::TlsOptions tlsOptionsFromBlobs
credentials.size(),
password.c_str(),
trustedCerts.data(),
trustedCerts.size());
tlsOptionsFromBlobs.setCrlFetchTimeoutMs(234567);
SessionOptions sessionOptions2;
sessionOptions2.setTlsOptions(tlsOptionsFromBlobs);
static TlsOptions createFromFiles(const char *clientCredentialsFileName, const char *clientCredentialsPassword, const char *trustedCertificatesFileName)
Definition blpapi_tlsoptions.h:414
static TlsOptions createFromBlobs(const char *clientCredentialsRawData, int clientCredentialsRawDataLength, const char *clientCredentialsPassword, const char *trustedCertificatesRawData, int trustedCertificatesRawDataLength)
Definition blpapi_tlsoptions.h:426

Classes

class  TlsOptions