EventSslContext::__construct

(PECL event >= 1.2.6-beta)

EventSslContext::__constructConstruye un contexto OpenSSL para usar con las clases Event

Descripción

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

Crea un contexto SSL que contiene el puntero hacia SSL_CTX (ver el manual del sistema).

Parámetros

method

Una de las constantes EventSslContext::*_METHOD.

options

Un array asociativo de opciones de contexto SSL. Una de las constantes EventSslContext::OPT_*.

Ejemplos

Ejemplo #1 Ejemplo con 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,
));
?>
add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top