Граф коммитов

1116 Коммитов

Автор SHA1 Сообщение Дата
Samuel Giddins 0d3ce31234 [ruby/openssl] Set time directly on the x509 store
(https://github.com/ruby/openssl/pull/770)

Instead of an ivar, so other ossl functions that take a store will use the correct time when verifying

https://github.com/ruby/openssl/commit/21aadc66ae
2024-07-24 16:51:00 +00:00
Kazuki Yamaguchi 1388945f0d [ruby/openssl] asn1: make ossl_asn1_get_asn1type() private
The function is not used anywhere outside of ossl_asn1.c.

https://github.com/ruby/openssl/commit/5392b79941
2024-07-24 16:50:01 +00:00
Kazuki Yamaguchi a1cf39bd36 [ruby/openssl] x509attr: avoid using OpenSSL::ASN1 internals in #value=
OpenSSL::ASN1 is being rewritten in Ruby. To make it easier, let's
remove dependency to the instance variables and the internal-use
function ossl_asn1_get_asn1type() outside OpenSSL::ASN1.

This also fixes the insufficient validation of the passed value with
its tagging.

https://github.com/ruby/openssl/commit/35a157462e
2024-07-24 16:50:01 +00:00
Grant Gardner 4d4ac00123 [ruby/openssl] Add SSLSocket#readbyte
Companion to getbyte but raise EOFError
Similar to https://github.com/ruby/openssl/pull/438

https://github.com/ruby/openssl/commit/c40f70711a
2024-07-03 08:54:18 +00:00
HoneyryderChuck 9c5e9d29f0 [ruby/openssl] rewriting most of the asn1 init code in ruby
to have as much of the lib in ruby as possible

https://github.com/ruby/openssl/commit/8305051728
2024-06-27 16:00:55 +00:00
gartens c735f4947e [ruby/openssl] Pass through nil as digest when signing certificates
(https://github.com/ruby/openssl/pull/761)

In order to sign certificates with Ed25519 keys, NULL must be passed
as md to X509_sign.  This NULL is then passed
(via ASN1_item_sign_ex) as type to EVP_DigestSignInit.  The
documentation[1] of EVP_DigestSignInit states that type must be NULL
for various key types, including Ed25519.

[1]: https://www.openssl.org/docs/manmaster/man3/EVP_DigestSignInit.html

https://github.com/ruby/openssl/commit/b0fc100091
2024-06-11 17:12:28 +00:00
Kazuki Yamaguchi 69c0b1438a [ruby/openssl] Fix references to the license text
Update the references to the file "LICENCE" with "COPYING".

The file LICENCE doesn't exist in ruby/ruby nor ruby/openssl. This has
been always the case since OpenSSL for Ruby 2 was merged to the ruby
tree as a standard library in 2003.

In OpenSSL for Ruby 2's CVS repository[1], the LICENCE file contained
an old version of the Ruby License, identical to the COPYING file that
was in Ruby's tree at that time (r4128[2]).

[1] http://cvs.savannah.gnu.org/viewvc/rubypki/ossl2/LICENCE?revision=1.1.1.1&view=markup
[2] 231247c010/COPYING

https://github.com/ruby/openssl/commit/5bccf07d04
2024-06-08 10:59:17 +00:00
Kazuki Yamaguchi 6475b093fb [ruby/openssl] Rename LICENSE.txt to COPYING
This is for consistency with ruby/ruby.

https://github.com/ruby/openssl/commit/00ad542791
2024-06-08 10:59:16 +00:00
Kazuki Yamaguchi 5f380dfdb2 [ruby/openssl] openssl.gemspec: add BSD-2-Clause to the list of licenses
ruby/openssl is licensed under the terms of either the Ruby License or
the 2-Clause BSD License.

The git repository and built .gem files always contained the license
text for both license, but the metadata in the gemspec only specified
the Ruby License. Let's include both.

https://github.com/ruby/openssl/commit/c71714d738
2024-06-08 10:59:14 +00:00
Samuel Giddins 0b92929e52 [ruby/openssl] Add X509::Certificate#tbs_bytes
Ref https://github.com/ruby/openssl/issues/519

This makes verifying embedded certificate transparency signatures
significantly easier, as otherwise the alternative was manipulating the
ASN1 sequence, as in
656d992fa8

https://github.com/ruby/openssl/commit/99128bea5d
2024-06-08 10:57:02 +00:00
KJ Tsanaktsidis 63e9eaa5be [ruby/openssl] Fix test_create_with_mac_iter accidently setting keytype not maciter
This test was accidentally passing the value 2048 into the keytype
parameter of PKCS12_create, not the mac_iter parameter (because it had
one too many `nil`s in the call). This value is invalid, and will make
OpenSSL perform an out-of-bounds read which is caught when compiling
with ASAN.

This commit fixes the tests, and also adds some validation to
PKCS12.create to make sure any keytype passed is actually valid. Since
there only two valid keytype constants, and the whole feature is an
export-grade crypto era thing only ever supported by old MSIE, it seems
far more likely that code in the whild is using keytype similarly by
mistake rather than as intended. So this validation might catch that.

https://github.com/ruby/openssl/commit/47028686d2
2024-06-05 00:45:53 +00:00
Samuel Giddins 841b45a442 [ruby/openssl] Add to_text for PKCS7 and Timestamp::Response
https://github.com/ruby/openssl/commit/71cd1e3f5c
2024-05-08 09:39:13 +00:00
Jean Boussier 7d42010fad [ruby/openssl] read: don't clear buffer when nothing can be read
To be consistent with regular Ruby IOs:

```ruby
r, _ = IO.pipe
buf = "garbage".b
r.read_nonblock(10, buf, exception: false) # => :wait_readable
p buf # => "garbage"
```

Ref: 98b8944460

https://github.com/ruby/openssl/commit/08452993d6
2024-05-05 08:00:00 +00:00
Jeremy Evans 55720f372d [ruby/openssl] pkcs7: raise PKCS7Error for PKCS7 without content in PKCS7.read_smime
[pkuzco: expanded the fix for other content types]
[ky: adjusted formatting and the exception type]

https://github.com/ruby/openssl/commit/07eceb7f63

Co-authored-by: pkuzco <b.naamneh@gmail.com>
Co-authored-by: Kazuki Yamaguchi <k@rhe.jp>
2024-05-02 16:26:11 +09:00
Jeremy Evans c9aa63a9e0 [ruby/openssl] pkcs7: raise ArgumentError for PKCS7 with no content in PKCS7.new
Fixes [Bug #19974]

[pkuzco: expanded the fix for other content types]
[ky: adjusted formatting and the exception type]

https://github.com/ruby/openssl/commit/27e11f2d1d

Co-authored-by: pkuzco <b.naamneh@gmail.com>
Co-authored-by: Kazuki Yamaguchi <k@rhe.jp>
2024-05-02 16:26:11 +09:00
Kazuki Yamaguchi eb6f0000a4 [ruby/openssl] cipher: fix buffer overflow in Cipher#update
OpenSSL::Cipher#update currently allocates the output buffer with size
(input data length)+(the block size of the cipher). This is insufficient
for the id-aes{128,192,256}-wrap-pad (AES keywrap with padding) ciphers.
They have a block size of 8 bytes, but the output may be up to 15 bytes
larger than the input.

Use (input data length)+EVP_MAX_BLOCK_LENGTH (== 32) as the output
buffer size, instead. OpenSSL doesn't provide a generic way to tell the
maximum required buffer size for ciphers, but this is large enough for
all algorithms implemented in current versions of OpenSSL.

Fixes: https://bugs.ruby-lang.org/issues/20236

https://github.com/ruby/openssl/commit/3035559f54
2024-05-02 16:26:11 +09:00
Jaymz Julian d39993a4ce [ruby/openssl] Fix performance regression in do_write(s)
This causes significant performance issues when using large (>10meg) writes

Fix by adjusting the buffer write function to clear the buffer once, rather than
piece by piece, avoiding a case where a large write (in our case, around
70mbytes) will consume 100% of CPU. This takes a webrick GET request via SSL
from around 200kbyts/sec and consuming 100% of a core, to line speed on gigabit
ethernet and 6% cpu utlization.

https://github.com/ruby/openssl/commit/d4389b425d
2024-05-02 16:24:36 +09:00
Kazuki Yamaguchi f5af620c61 [ruby/openssl] asn1: check error return from i2d_ASN1_TYPE()
i2d_ASN1_TYPE() is not expected to fail, but the return value should be
checked.

https://github.com/ruby/openssl/commit/21ed3c310e
2024-05-02 07:17:35 +00:00
Bart de Water 9d75d9f07c [ruby/openssl] Update Cipher#name to match Digest#name explanation
https://github.com/ruby/openssl/commit/79e6dead6e
2024-04-30 15:05:50 +00:00
Bart de Water cc6657e563 [ruby/openssl] Add OpenSSL::Digest.digests to get a list of available digests
https://github.com/ruby/openssl/commit/08dd3c73b7
2024-04-30 15:05:50 +00:00
Samuel Williams 368ce0758e [ruby/openssl] Further clarification of documentation.
https://github.com/ruby/openssl/commit/0697f2f8b4
2024-04-30 14:51:59 +00:00
Samuel Williams f1afae2459 [ruby/openssl] More documentation.
https://github.com/ruby/openssl/commit/c8377eaf8d
2024-04-30 14:51:59 +00:00
Samuel Williams 1699772ac4 [ruby/openssl] Introduce basic support for `close_read` and `close_write`.
https://github.com/ruby/openssl/commit/c99d24cee9
2024-04-30 14:51:58 +00:00
卜部昌平 c844968b72 ruby tool/update-deps --fix 2024-04-27 21:55:28 +09:00
Hiroshi SHIBATA 7630a89a4b Use www.rfc-editor.org for RFC text.
We use the following site for that now:

* https://tools.ietf.org/ or http
* https://datatracker.ietf.org or http

Today, IETF said the official site of RFC is www.rfc-editor.org.

FYI: https://authors.ietf.org/en/references-in-rfcxml

I replaced them to www.rfc-editor.org.
2024-03-28 11:44:45 +09:00
Benoit Daloze 6ecee4ec31 [ruby/openssl] Revert "Always respect the openssl prefix chosen by truffle/openssl-prefix on TruffleRuby"
* This reverts commit https://github.com/ruby/openssl/commit/ca738e7e1357.
* No longer needed since https://github.com/oracle/truffleruby/issues/3170 was fixed.

https://github.com/ruby/openssl/commit/1f641a5604
2024-03-20 11:44:13 +00:00
Samuel Williams 4f634d3c85 [ruby/openssl] Add support for IO#timeout.
(https://github.com/ruby/openssl/pull/714)

* Add support for IO#timeout.

https://github.com/ruby/openssl/commit/3bbf5178a9
2024-01-17 17:09:03 +00:00
Ewoud Kohl van Wijngaarden 6213ab1a51 [ruby/openssl] Only set min_version on OpenSSL < 1.1.0
Both Red Hat and Debian-like systems configure the minimum TLS version
to be 1.2 by default, but allow users to change this via configs.

On Red Hat and derivatives this happens via crypto-policies[1], which in
writes settings in /etc/crypto-policies/back-ends/opensslcnf.config.
Most notably, it sets TLS.MinProtocol there. For Debian there's
MinProtocol in /etc/ssl/openssl.cnf. Both default to TLSv1.2, which is
considered a secure default.

In constrast, the SSLContext has a hard coded OpenSSL::SSL::TLS1_VERSION
for min_version. TLS 1.0 and 1.1 are considered insecure. By always
setting this in the default parameters, the system wide default can't be
respected, even if a developer wants to.

This takes the approach that's also done for ciphers: it's only set for
OpenSSL < 1.1.0.

[1]: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/security_hardening/using-the-system-wide-cryptographic-policies_security-hardening

https://github.com/ruby/openssl/commit/ae215a47ae
2024-01-17 16:41:47 +00:00
Samuel Williams f7178045bb [ruby/openssl] Add support for `gets(chomp: true)`.
https://github.com/ruby/openssl/commit/8aa3849cff
2024-01-13 00:28:26 +00:00
Samuel Williams 08d4e5ebef [ruby/openssl] Add more methods to `SocketForwarder`.
https://github.com/ruby/openssl/commit/39eaa9f677
2024-01-13 00:28:26 +00:00
Jun Aruga 3140886b75 [ruby/openssl] History.md: Escape Markdown syntax Italic "*". [ci skip]
https://github.com/ruby/openssl/commit/dc26433ae5
2023-11-25 10:05:24 +00:00
Kazuki Yamaguchi 2df00640ff [ruby/openssl] Ruby/OpenSSL 3.2.0
https://github.com/ruby/openssl/commit/6b3dd6a372
2023-09-21 20:01:23 +00:00
Kazuki Yamaguchi a2f1195beb [ruby/openssl] Update README and gemspec description
* Reword the description in README for more clarity.

 * Add a compatibility matrix of our stable branches and explain the
   maintenance policy.

 * Remove the obsolete paragraph for how to use the gem in Ruby 2.3,
   which is no longer supported.

https://github.com/ruby/openssl/commit/7691034fcb
2023-09-21 20:01:23 +00:00
Michael Richardson 91e5f51607 [ruby/openssl] x509ext: let X509::ExtensionFactory#create_ext take a dotted OID string
instead of looking of NIDs and then using X509V3_EXT_nconf_nid,
instead just pass strings to X509V3_EXT_nconf, which has all the logic for
processing dealing with generic extensions
also process the oid through ln2nid() to retain compatibility.

[rhe: tweaked commit message and added a test case]

https://github.com/ruby/openssl/commit/9f15741331
2023-09-06 19:30:32 +09:00
Petrik 9b6128c541 [ruby/openssl] Fix OCSP documentation
`port` should be called on the `ocsp_uri` URI instead of `ocsp`, which
is just a string.

https://github.com/ruby/openssl/commit/89a1c82dd0
2023-09-06 19:26:27 +09:00
Mau Magnaguagno 60a6de81a8 [ruby/openssl] Prefer String#unpack1
(https://github.com/ruby/openssl/pull/586)

String#unpack1 avoids the intermediate array created by String#unpack
for single elements, while also making a call to Array#first/[0]
unnecessary.

https://github.com/ruby/openssl/commit/8eb0715a42
2023-09-06 19:24:53 +09:00
Kazuki Yamaguchi b6d7cdc2ba [ruby/openssl] ssl: use ffdhe2048 from RFC 7919 as the default DH group parameters
In TLS 1.2 or before, if DH group parameters for DHE are not supplied
with SSLContext#tmp_dh= or #tmp_dh_callback=, we currently use the
self-generated parameters added in commit https://github.com/ruby/openssl/commit/bb3399a61c03 ("support 2048
bit length DH-key", 2016-01-15) as the fallback.

While there is no known weakness in the current parameters, it would be
a good idea to switch to pre-defined, more well audited parameters.

This also allows the fallback to work in the FIPS mode.

The PEM encoding was derived with:

	# RFC 7919 Appendix A.1. ffdhe2048
	print OpenSSL::PKey.read(OpenSSL::ASN1::Sequence([OpenSSL::ASN1::Integer((<<-END).split.join.to_i(16)), OpenSSL::ASN1::Integer(2)]).to_der).to_pem
	    FFFFFFFF FFFFFFFF ADF85458 A2BB4A9A AFDC5620 273D3CF1
	    D8B9C583 CE2D3695 A9E13641 146433FB CC939DCE 249B3EF9
	    7D2FE363 630C75D8 F681B202 AEC4617A D3DF1ED5 D5FD6561
	    2433F51F 5F066ED0 85636555 3DED1AF3 B557135E 7F57C935
	    984F0C70 E0E68B77 E2A689DA F3EFE872 1DF158A1 36ADE735
	    30ACCA4F 483A797A BC0AB182 B324FB61 D108A94B B2C8E3FB
	    B96ADAB7 60D7F468 1D4F42A3 DE394DF4 AE56EDE7 6372BB19
	    0B07A7C8 EE0A6D70 9E02FCE1 CDF7E2EC C03404CD 28342F61
	    9172FE9C E98583FF 8E4F1232 EEF28183 C3FE3B1B 4C6FAD73
	    3BB5FCBC 2EC22005 C58EF183 7D1683B2 C6F34A26 C1B2EFFA
	    886B4238 61285C97 FFFFFFFF FFFFFFFF
	END

https://github.com/ruby/openssl/commit/a5527cb4f4
2023-09-06 19:24:43 +09:00
Mau Magnaguagno 4a042b2255 [ruby/openssl] Refactor Buffering consume_rbuff and getbyte methods
Prefer ``slice!`` for ``Buffering#consume_rbuff`` and safe navigation with ``ord`` for ``Buffering#getbyte``, similar to ``each_byte``.

https://github.com/ruby/openssl/commit/5f6abff178
2023-09-06 19:24:02 +09:00
Kazuki Yamaguchi 912f1cda0d [ruby/openssl] Remove OSSL_DEBUG compile-time option
Remove the OSSL_DEBUG flag and OpenSSL.mem_check_start which is only
compiled when the flag is given. They are meant purely for development
of Ruby/OpenSSL.

OpenSSL.mem_check_start helped us find memory leak bugs in past, but
it is no longer working with the recent OpenSSL versions. Let's just
remove it now.

https://github.com/ruby/openssl/commit/8c7a6a17e2
2023-09-06 19:20:57 +09:00
Jun Aruga b0ec1db8a7 [ruby/openssl] ossl_pkey.c: Workaround: Decode with non-zero selections.
This is a workaround for the decoding issue in ossl_pkey_read_generic().
The issue happens in the case that a key management provider is different from
a decoding provider.

Try all the non-zero selections in order, instead of selection 0 for OpenSSL 3
to avoid the issue.

https://github.com/ruby/openssl/commit/db688fa739
2023-08-28 12:05:33 +09:00
Jun Aruga b5d0374635
[ruby/openssl] Fix LIBRESSL_VERSION_NUMBER document mistake.
* Fix the wrong man reference.
* According to the LIBRESSL_VERSION_NUMBER(3), the value always ends with 00f.

```
$ man -M /home/jaruga/.local/libressl-6650dce/share/man/ 3 LIBRESSL_VERSION_NUMBER
...
DESCRIPTION
     OPENSSL_VERSION_NUMBER and LIBRESSL_VERSION_NUMBER are numeric release version
     identifiers.  The first two digits contain the major release number, the third and
     fourth digits the minor release number, and the fifth and sixth digits the fix re‐
     lease number.  For OpenSSL, the seventh and eight digits contain the patch release
     number and the final digit is 0 for development, 1 to e for betas 1 to 14, or f
     for release.  For LibreSSL, OPENSSL_VERSION_NUMBER is always 0x020000000, and
     LIBRESSL_VERSION_NUMBER always ends with 00f.
```

https://github.com/ruby/openssl/commit/296c859d18
2023-08-25 18:34:47 +09:00
Jun Aruga f1df062944 [ruby/openssl] Enhance printing OpenSSL versions.
* Updated the `OpenSSL::OPENSSL_VERSION_NUMBER` comment explaining the format.
* Added the `OpenSSL::LIBRESSL_VERSION_NUMBER` to print LibreSSL version number,
  in the case that Ruby OpenSSL binding is compiled with LibreSSL. Note
  `test/openssl/utils.rb#libressl?` is not using this value in it for now.
* Update `rake debug` to print the values in a readable way, adding
  `OpenSSL::OPENSSL_VERSION_NUMBER` and `OpenSSL::LIBRESSL_VERSION_NUMBER`.

https://github.com/ruby/openssl/commit/d19e6360ed
2023-08-16 14:48:42 +09:00
Kazuki Yamaguchi 12bdacdca5 [ruby/openssl] Include "additional data" message in OpenSSL errors
Error entries in the OpenSSL error queue may contain additional
contextual information associated with the error, which can be helpful
when debugging.

This "additional data" is currently only printed to stderr when
OpenSSL.debug is enabled. Let's include this in the exception messages
raised with ossl_raise(), too.

	$ ruby -Ilib -ropenssl -e'OpenSSL.debug=true; OpenSSL::SSL::SSLContext.new.ecdh_curves="P-256:not-a-curve"'
	-e:1: warning: error on stack: error:0A080106:SSL routines:gid_cb:passed invalid argument (group 'not-a-curve' cannot be set)
	-e:1:in `ecdh_curves=': passed invalid argument (group 'not-a-curve' cannot be set) (OpenSSL::SSL::SSLError)
		from -e:1:in `<main>'

https://github.com/ruby/openssl/commit/1c5bbdd68e
2023-08-16 14:48:41 +09:00
Kazuki Yamaguchi 01d368e7b0 [ruby/openssl] ssl: raise SSLError if loading ca_file or ca_path fails
When compiled with OpenSSL <= 1.1.1, OpenSSL::SSL::SSLContext#setup
does not raise an exception on an error return from
SSL_CTX_load_verify_locations(), but instead only prints a verbose-mode
warning. This is not helpful since it very likely indicates an actual
error, such as the specified file not being readable.

Also, OpenSSL's error queue is not correctly cleared:

	$ ruby -w -ropenssl -e'OpenSSL.debug=true; ctx=OpenSSL::SSL::SSLContext.new; ctx.ca_file="bad-path"; ctx.setup; pp OpenSSL.errors'
	-e:1: warning: can't set verify locations
	["error:02001002:system library:fopen:No such file or directory",
	 "error:2006D080:BIO routines:BIO_new_file:no such file",
	 "error:0B084002:x509 certificate routines:X509_load_cert_crl_file: system lib"]

The behavior is currently different when compiled with OpenSSL >= 3.0:
SSLError is raised if SSL_CTX_load_verify_file() or
SSL_CTX_load_verify_dir() fails.

This inconsistency was unintentionally introduced by commit https://github.com/ruby/openssl/commit/5375a55ffc35
("ssl: use SSL_CTX_load_verify_{file,dir}() if available", 2020-02-22).
However, raising SSLError seems more appropriate in this situation.
Let's adjust the OpenSSL <= 1.1.1 code so that it behaves the same way
as the OpenSSL >= 3.0 code currently does.

Fixes: https://github.com/ruby/openssl/issues/649

https://github.com/ruby/openssl/commit/7eb10f7b75
2023-08-16 14:48:41 +09:00
Jun Aruga 8dd5c20224 [ruby/openssl] Raise an error when the specified OpenSSL library directory doesn't exist.
OpenSSL built from the source creates the library directory to the
`/path/to/openssl_dir/lib64` as a default.
In the case, the `bundle exec rake compile -- --with-openssl-dir=<openssl_dir>`
cannot compile with the lib64 directory, and may compile with system OpenSSL's
libraries unintentionally. This commit is to check this case to avoid linking
with an unintentional library directory.

https://github.com/ruby/openssl/commit/ca54087462
2023-08-16 14:48:41 +09:00
Kazuki Yamaguchi 0eaee5c000 [ruby/openssl] [DOC] enhance RDoc for exporting pkeys
Describe the behavior of OpenSSL::PKey::{DH,DSA,EC,RSA}#to_pem
and #to_der more clearly. They return a different result depending on
whether the pkey is a public or private key. This was not documented
adequately.

Also, suggest the use of OpenSSL::PKey::PKey#private_to_pem
and #public_to_pem instead, if possible.

https://github.com/ruby/openssl/commit/d22769af8f
2023-08-16 14:48:40 +09:00
Kazuki Yamaguchi fae6fd07fe [ruby/openssl] [DOC] prefer PKey#private_to_pem and #public_to_pem in RDoc
Suggest the use of OpenSSL::PKey::PKey#private_to_pem and #public_to_pem
in the top-level documentation. For new programs, these are recommended
over OpenSSL::PKey::RSA#export (also aliased as #to_s and #to_pem)
unless there is a specific reason to use it, i.e., unless the PKCS#1
output format specifically is required.

The output format of OpenSSL::PKey::RSA#export depends on whether the
key is a public key or a private key, which is very counter-intuitive.

Additionally, when called with arguments to encrypt a private key, as in
this example, OpenSSL's own, non-standard format is used. The man page
of PEM_write_bio_PrivateKey_traditional(3) in OpenSSL 1.1.1 or later
states that it "should only be used for compatibility with legacy
programs".

https://github.com/ruby/openssl/commit/56312038d6
2023-08-16 14:48:40 +09:00
Kazuki Yamaguchi 4541cd4cba [ruby/openssl] [DOC] prefer "password" to "passphrase"
Let's consistently use the word "password". Although they are considered
synonymous, the mixed usage in the rdoc can cause confusion.

OpenSSL::KDF.scrypt is an exception. This is because RFC 7914 refers to
the input parameter as "passphrase".

https://github.com/ruby/openssl/commit/06d67640e9
2023-08-16 14:48:40 +09:00
Kazuki Yamaguchi cb344e4e25 [ruby/openssl] ssl: adjust "certificate verify failed" error on SSL_ERROR_SYSCALL
Enrich SSLError's message with the low-level certificate verification
result, even if SSL_get_error() returns SSL_ERROR_SYSCALL. This is
currently done on SSL_ERROR_SSL only.

According to the man page of SSL_get_error(), SSL_ERROR_SYSCALL may be
returned for "other errors, check the error queue for details". This
apparently means we have to treat SSL_ERROR_SYSCALL, if errno is not
set, as equivalent to SSL_ERROR_SSL.

https://github.com/ruby/openssl/commit/5113777e82
2023-08-16 14:48:39 +09:00
Kazuki Yamaguchi 66a70582f4 [ruby/openssl] ssl: adjust styles of ossl_start_ssl()
Expand tabs, insert some spaces, and adjust indentation of switch-case
to match Ruby's style.

https://github.com/ruby/openssl/commit/10833aa8f6
2023-08-16 14:48:39 +09:00