]> granicus.if.org Git - php/commit
Added client-side Server Name Indication (SNI) support in OpenSSL extension.
authorArnaud Le Blanc <lbarnaud@php.net>
Wed, 21 Oct 2009 16:10:19 +0000 (16:10 +0000)
committerArnaud Le Blanc <lbarnaud@php.net>
Wed, 21 Oct 2009 16:10:19 +0000 (16:10 +0000)
commitc29b5be312085fa700dce07751137668f48454f3
tree6c91809a77b8548349872227e650ecf4df46b4a7
parentdd60a6eeb6dfe62ed0d3ba303d86121832c5a1c6
Added client-side Server Name Indication (SNI) support in OpenSSL extension.
#
# [DOC]
#
# New SSL context options :
#
# - SNI_enabled : Set to FALSE to disable SNI support (enabled by default)
# - SNI_server_name : If not set, the server name will be guessed from the
# stream URL (e.g. https://example.com/ will use example.com as hostname.),
# else the given name will be used.
#
# SNI is to SSL/TLS what the Host header is for HTTP : it allows multiple
# certificates on the same IP address.
#
# As for HTTP virtual hosts, this should be totaly transparent in most cases.
#
# Context options allows more control, e.g. :
#
# $context = stream_context_create(array(
#   'ssl' => array('SNI_server_name' => 'foo.example.com'),
#   'http' => array('header' => 'Host: foo.example.com'),
# ));
# file_get_contents('https://127.0.0.1/', false, $context);
#
# OpenSSL >= 0.9.8j supports SNI (by default since OpenSSL 0.9.8k).
ext/openssl/openssl.c
ext/openssl/tests/sni_001.phpt [new file with mode: 0644]
ext/openssl/xp_ssl.c