Skip to content

Commit 2f04ba4

Browse files
authored
Merge pull request #1103 from rhenium/ky/ssl-test-minmax-proto-refactor
ssl: refactor tests for protocol version negotiation
2 parents 614831d + 5d1ce0d commit 2f04ba4

2 files changed

Lines changed: 164 additions & 160 deletions

File tree

ext/openssl/ossl_ssl.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -919,11 +919,16 @@ parse_proto_version(VALUE str)
919919
* call-seq:
920920
* ctx.min_version = OpenSSL::SSL::TLS1_2_VERSION
921921
* ctx.min_version = :TLS1_2
922+
* ctx.min_version = 0
922923
* ctx.min_version = nil
923924
*
924-
* Sets the lower bound on the supported SSL/TLS protocol version. The
925+
* Sets the lower bound of the supported SSL/TLS protocol version range. The
925926
* version may be specified by an integer constant named
926-
* OpenSSL::SSL::*_VERSION, a Symbol, or +nil+ which means "any version".
927+
* OpenSSL::SSL::*_VERSION or a Symbol. A value of +0+ or +nil+ leaves the
928+
* lower bound unspecified.
929+
*
930+
* See also #security_level=, which may further restrict the available protocol
931+
* versions.
927932
*
928933
* === Example
929934
* ctx = OpenSSL::SSL::SSLContext.new
@@ -952,9 +957,10 @@ ossl_sslctx_set_min_version(VALUE self, VALUE v)
952957
* call-seq:
953958
* ctx.max_version = OpenSSL::SSL::TLS1_2_VERSION
954959
* ctx.max_version = :TLS1_2
960+
* ctx.max_version = 0
955961
* ctx.max_version = nil
956962
*
957-
* Sets the upper bound of the supported SSL/TLS protocol version. See
963+
* Sets the upper bound of the supported SSL/TLS protocol version range. See
958964
* #min_version= for the possible values.
959965
*/
960966
static VALUE

0 commit comments

Comments
 (0)