« EventSslContext
EventUtil »

EventSslContext::__construct

(PECL event >= 1.2.6-beta)

EventSslContext::__construct — Constructs an OpenSSL context for use with Event classes

説明

public function EventSslContext::__construct( string $method , string $options )

Creates SSL context holding pointer to SSL_CTX (see the system manual).

パラメータ

method

One of EventSslContext::*_METHOD constants.

options

Associative array of SSL context options One of EventSslContext::OPT_* constants.

例

例1 EventSslContext::__construct() example

<?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,
));
?>
関連キーワード:
EventSslContext   context   construct   Constructs   OpenSSL   Event   classes   options   method   constants   local   EventUtil   event   beta   Creates   holding   pointer   system   Associative   example   SSLv   cert   server
関連する関数・ページ:
class.eventsslcontext   eventbufferevent.sslfilter   eventhttpconnection.construct   event.construct   function.stream-context-get-options   function.stream-context-set-options