TsgcHTTP2Client속성 › TLSOptions

TLSOptions 속성

TLS를 통한 HTTP/2에 사용되는 인증서, TLS 버전, ALPN, IOHandler 및 기타 보안 연결 세부 정보를 구성합니다.

구문

property TLSOptions: TsgcTCPTLS_Options read FTLSOptions write SetTLSOptions;

기본값

설명

TLSTrue일 때 사용됩니다. 하위 속성에는 RootCertFile, CertFile, KeyFile, Password, VerifyCertificate, VerifyDepth, Version(tlsUndefined부터 tls1_3까지), ALPNProtocolsIOHandler(iohOpenSSL 또는 iohSChannel)가 포함됩니다. HTTP/2는 TLS 핸드셰이크 중에 h2 프로토콜을 알리기 위해 ALPN이 필요합니다. 구성 요소는 ALPN 목록을 h2로 자동으로 채우지만 서버가 추가 식별자를 예상하는 경우 ALPNProtocols를 확장할 수 있습니다. OpenSSL 관련 설정은 OpenSSL_Options 아래에 있고 SChannel 관련 설정은 SChannel_Options 아래에 있습니다. HTTP/2에는 TLS 1.2 이상이 권장됩니다.

예제


oHTTP2 := TsgcHTTP2Client.Create(nil);
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';

속성으로 돌아가기