TsgcHTTP2Client › Eigenschappen › TLSOptions
Configureert certificaten, TLS-versie, ALPN, IOHandler en andere beveiligde verbindingsdetails die worden gebruikt voor HTTP/2 via TLS.
__property TsgcTCPTLS_Options * TLSOptions;
—
Wordt gebruikt wanneer TLS True is. Sub-eigenschappen zijn onder andere RootCertFile, CertFile, KeyFile, Password, VerifyCertificate, VerifyDepth, Version (van tlsUndefined tot en met tls1_3), ALPNProtocols en IOHandler (iohOpenSSL of iohSChannel). HTTP/2 vereist ALPN om het h2-protocol te adverteren tijdens de TLS-handshake; het component vult de ALPN-lijst automatisch met h2, maar ALPNProtocols kan worden uitgebreid als de server aanvullende id's verwacht. OpenSSL-specifieke instellingen staan onder OpenSSL_Options en SChannel-specifieke instellingen onder SChannel_Options. TLS 1.2 of hoger wordt aanbevolen voor HTTP/2.
oHTTP2 = new TsgcHTTP2Client();
oHTTP2->Host = "http2.akamai.com";
oHTTP2->Port = 443;
oHTTP2->TLS = true;
oHTTP2->TLSOptions->Version = tls1_2;
oHTTP2->TLSOptions->VerifyCertificate = true;
oHTTP2->TLSOptions->RootCertFile = "cacert.pem";