Skip to content

OpenSSL min and max proto version options #3317

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 1, 2018

Conversation

bukka
Copy link
Member

@bukka bukka commented Jun 22, 2018

This PR adds two new options for ssl/tls streams to set min and max protocol version:

  • min_proto_version - minimal protocol version
  • max_proto_version - maximal protocol version

There are new stream constants that should be used as a value:

  • STREAM_CRYPTO_PROTO_SSLv3
  • STREAM_CRYPTO_PROTO_TLSv1_0
  • STREAM_CRYPTO_PROTO_TLSv1_1
  • STREAM_CRYPTO_PROTO_TLSv1_2

It is basically meant as a feature replacement for crypto_method that requires setting of all allowed protocols as a mask which means that the protocol holes were allowed. That is also changed in this PR as protocol holes should not be used which is explicitly stated in OpenSSL docs:

https://www.openssl.org/docs/man1.1.0/ssl/SSL_CTX_new.html (notes section)

It means that crypto_method will automatically fill missing protocols. For example STREAM_CRYPTO_METHOD_TLSv1_0_SERVER | STREAM_CRYPTO_METHOD_TLSv1_2_SERVER will also set STREAM_CRYPTO_METHOD_TLSv1_1_SERVER as can be seen in the changed stream_crypto_flags_003.phpt test.

@krakjoe
Copy link
Member

krakjoe commented Jun 25, 2018

What's the status of this work ? Was this prompted by some other discussion on github, or is there an internals discussion about it ?

I feel like I'm missing context, but it could just be because ... I'm missing context (I defer to you or others for reviewing these things) ...

@bukka
Copy link
Member Author

bukka commented Jun 25, 2018

@krakjoe see https://externals.io/message/102369

Basically it will be merged soon if there are no objections :)

@bukka bukka force-pushed the openssl_proto_minmax branch from d92ed2b to d404b5e Compare July 1, 2018 17:47
@php-pulls php-pulls merged commit d404b5e into php:master Jul 1, 2018
php-pulls pushed a commit that referenced this pull request Oct 28, 2018
PR #3317[1] is relevant for the migration guide, so we add a respective
note in UPGRADING.

[1] <#3317>
clue added a commit to clue-labs/socket that referenced this pull request Nov 17, 2019
Explicit TLS 1.3 will be available via in PHP 7.4:
php/php-src#3909

Older PHP versions implicitly support TLS 1.3 provided that the
underlying OpenSSL version supports TLS 1.3. However, for PHP 7.3 some
recent changes implicitly disable TLS 1.3, so we skip TLS 1.3 tests on
affected PHP versions: php/php-src#3317
clue added a commit to clue-labs/socket that referenced this pull request Nov 17, 2019
Explicit TLS 1.3 will be available via in PHP 7.4:
php/php-src#3909

Older PHP versions implicitly support TLS 1.3 provided that the
underlying OpenSSL version supports TLS 1.3. However, for PHP 7.3 some
recent changes implicitly disable TLS 1.3, so we skip TLS 1.3 tests on
affected PHP versions: php/php-src#3317
clue added a commit to clue-labs/socket that referenced this pull request Nov 17, 2019
Explicit TLS 1.3 support will be available in PHP 7.4:
php/php-src#3909

Older PHP versions implicitly support TLS 1.3 provided that the
underlying OpenSSL version supports TLS 1.3. However, for PHP 7.3 some
recent changes implicitly disable TLS 1.3, so we skip TLS 1.3 tests on
affected PHP versions: php/php-src#3317
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants