Event EventSslContext::__construct
(PECL event >= 1.2.6-beta)
EventSslContext::__construct — 이벤트 클래스와 함께 사용할 OpenSSL 컨텍스트를 구성합니다.
설명
public EventSslContext::__construct( string $method
, string $options
)
SSL_CTX
에 대한 포인터를 보유하는 SSL 컨텍스트를 생성합니다(시스템 매뉴얼 참조).
매개변수
method
EventSslContext::*_METHOD
constants 중 하나입니다.options
- SSL 컨텍스트 옵션의 연관 배열
EventSslContext::OPT_*
constants 중 하나입니다.
반환 값
EventSslContext 개체를 반환합니다.
Examples
예제 #1 EventSslContext::__construct() 예제
<?php
$ctx = new EventSslContext(EventSslContext::SSLv3_SERVER_METHOD, array(
EventSslContext::OPT_LOCAL_CERT => $local_cert,
EventSslContext::OPT_LOCAL_PK => $local_pk,
EventSslContext::OPT_PASSPHRASE => "echo server",
EventSslContext::OPT_VERIFY_PEER => true,
EventSslContext::OPT_ALLOW_SELF_SIGNED => false,
));
?>