Skip to content

Commit 2a87a42

Browse files
committed
Dropped CN_match and SNI_server_name context options
1 parent 4694e1c commit 2a87a42

File tree

3 files changed

+6
-15
lines changed

3 files changed

+6
-15
lines changed

NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,8 @@
147147
streams to negotiate alternative protocols using the ALPN TLS extension when
148148
built against OpenSSL 1.0.2 or newer. Negotiated protocol information is
149149
accessible through stream_get_meta_data() output.
150+
. Removed "CN_match" and "SNI_server_name" SSL context options. Use automatic
151+
detection or the "peer_name" option instead. (Nikita)
150152

151153
- pcntl:
152154
. Fixed bug #60509 (pcntl_signal doesn't decrease ref-count of old handler

UPGRADING

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,8 @@ Other
482482
- OpenSSL:
483483
. Removed the "rsa_key_size" SSL context option in favor of automatically
484484
setting the appropriate size given the negotiated crypto algorithm.
485+
. Removed "CN_match" and "SNI_server_name" SSL context options. Use automatic
486+
detection or the "peer_name" option instead.
485487

486488
- PCRE:
487489
. Removed support for /e (PREG_REPLACE_EVAL) modifier. Use

ext/openssl/xp_ssl.c

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -484,17 +484,15 @@ static int apply_peer_verification_policy(SSL *ssl, X509 *peer, php_stream *stre
484484
int err,
485485
must_verify_peer,
486486
must_verify_peer_name,
487-
must_verify_fingerprint,
488-
has_cnmatch_ctx_opt;
487+
must_verify_fingerprint;
489488

490489
php_openssl_netstream_data_t *sslsock = (php_openssl_netstream_data_t*)stream->abstract;
491490

492491
must_verify_peer = GET_VER_OPT("verify_peer")
493492
? zend_is_true(val)
494493
: sslsock->is_client;
495494

496-
has_cnmatch_ctx_opt = GET_VER_OPT("CN_match");
497-
must_verify_peer_name = (has_cnmatch_ctx_opt || GET_VER_OPT("verify_peer_name"))
495+
must_verify_peer_name = GET_VER_OPT("verify_peer_name")
498496
? zend_is_true(val)
499497
: sslsock->is_client;
500498

@@ -549,12 +547,6 @@ static int apply_peer_verification_policy(SSL *ssl, X509 *peer, php_stream *stre
549547
if (must_verify_peer_name) {
550548
GET_VER_OPT_STRING("peer_name", peer_name);
551549

552-
if (has_cnmatch_ctx_opt) {
553-
GET_VER_OPT_STRING("CN_match", peer_name);
554-
php_error(E_DEPRECATED,
555-
"the 'CN_match' SSL context option is deprecated in favor of 'peer_name'"
556-
);
557-
}
558550
/* If no peer name was specified we use the autodetected url name in client environments */
559551
if (peer_name == NULL && sslsock->is_client) {
560552
peer_name = sslsock->url_name;
@@ -1429,11 +1421,6 @@ static void enable_client_sni(php_stream *stream, php_openssl_netstream_data_t *
14291421

14301422
GET_VER_OPT_STRING("peer_name", sni_server_name);
14311423

1432-
if (GET_VER_OPT("SNI_server_name")) {
1433-
GET_VER_OPT_STRING("SNI_server_name", sni_server_name);
1434-
php_error(E_DEPRECATED, "SNI_server_name is deprecated in favor of peer_name");
1435-
}
1436-
14371424
if (sni_server_name) {
14381425
SSL_set_tlsext_host_name(sslsock->ssl_handle, sni_server_name);
14391426
}

0 commit comments

Comments
 (0)