<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/ext/openssl/ossl_pkey.c, branch v3_2_11</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>[ruby/openssl] Use EVP_Digest{Sign,Verify} when available</title>
<updated>2022-12-13T09:07:41+00:00</updated>
<author>
<name>Theo Buehler</name>
<email>tb@openbsd.org</email>
</author>
<published>2022-11-10T13:50:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=d92f4fe4d74d929cec9ca36ec3dbec070b314902'/>
<id>d92f4fe4d74d929cec9ca36ec3dbec070b314902</id>
<content type='text'>
LibreSSL 3.4 added EVP_DigestSign() and EVP_DigestVerify(). Use them
when available to prepare for the addition of Ed25519 support in
LibreSSL 3.7.

https://github.com/ruby/openssl/commit/475b2bf766
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
LibreSSL 3.4 added EVP_DigestSign() and EVP_DigestVerify(). Use them
when available to prepare for the addition of Ed25519 support in
LibreSSL 3.7.

https://github.com/ruby/openssl/commit/475b2bf766
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/openssl] pkey: restore support for decoding "openssl ecparam -genkey" output</title>
<updated>2022-10-17T07:35:35+00:00</updated>
<author>
<name>Kazuki Yamaguchi</name>
<email>k@rhe.jp</email>
</author>
<published>2022-09-02T13:40:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=0677b2fb87fa4bdff64e650e5df0fd7bf684bd2e'/>
<id>0677b2fb87fa4bdff64e650e5df0fd7bf684bd2e</id>
<content type='text'>
Scan through the input for a private key, then fallback to generic
decoder.

OpenSSL 3.0's OSSL_DECODER supports encoded key parameters. The PEM
header "-----BEGIN EC PARAMETERS-----" is used by one of such encoding
formats. While this is useful for OpenSSL::PKey::PKey, an edge case has
been discovered.

The openssl CLI command line "openssl ecparam -genkey" prints two PEM
blocks in a row, one for EC parameters and another for the private key.
Feeding the whole output into OSSL_DECODER results in only the first PEM
block, the key parameters, being decoded. Previously, ruby/openssl did
not support decoding key parameters and it would decode the private key
PEM block instead.

While the new behavior is technically correct, "openssl ecparam -genkey"
is so widely used that ruby/openssl does not want to break existing
applications.

Fixes https://github.com/ruby/openssl/pull/535

https://github.com/ruby/openssl/commit/d486c82833
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Scan through the input for a private key, then fallback to generic
decoder.

OpenSSL 3.0's OSSL_DECODER supports encoded key parameters. The PEM
header "-----BEGIN EC PARAMETERS-----" is used by one of such encoding
formats. While this is useful for OpenSSL::PKey::PKey, an edge case has
been discovered.

The openssl CLI command line "openssl ecparam -genkey" prints two PEM
blocks in a row, one for EC parameters and another for the private key.
Feeding the whole output into OSSL_DECODER results in only the first PEM
block, the key parameters, being decoded. Previously, ruby/openssl did
not support decoding key parameters and it would decode the private key
PEM block instead.

While the new behavior is technically correct, "openssl ecparam -genkey"
is so widely used that ruby/openssl does not want to break existing
applications.

Fixes https://github.com/ruby/openssl/pull/535

https://github.com/ruby/openssl/commit/d486c82833
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/openssl] pkey: clear error queue before each OSSL_DECODER_from_bio() call</title>
<updated>2022-10-17T07:35:35+00:00</updated>
<author>
<name>Kazuki Yamaguchi</name>
<email>k@rhe.jp</email>
</author>
<published>2022-09-02T09:14:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=4fb2845c7b71d94f01a224020e4eb91c99f99d66'/>
<id>4fb2845c7b71d94f01a224020e4eb91c99f99d66</id>
<content type='text'>
Fix potential error queue leak.

https://github.com/ruby/openssl/commit/3992b6f208
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix potential error queue leak.

https://github.com/ruby/openssl/commit/3992b6f208
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/openssl] Check if the option is an Hash in `pkey_ctx_apply_options0()`</title>
<updated>2022-10-17T07:35:35+00:00</updated>
<author>
<name>Nobuhiro IMAI</name>
<email>nov@yo.rim.or.jp</email>
</author>
<published>2022-08-05T09:42:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=a98096349ec7280edabf3822d2c6932ac6e63634'/>
<id>a98096349ec7280edabf3822d2c6932ac6e63634</id>
<content type='text'>
causes SEGV if it is an Array or something like that.

https://github.com/ruby/openssl/commit/ef23525210
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
causes SEGV if it is an Array or something like that.

https://github.com/ruby/openssl/commit/ef23525210
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/openssl] Fix build with LibreSSL 3.5</title>
<updated>2022-07-08T14:18:14+00:00</updated>
<author>
<name>Jeremy Evans</name>
<email>code@jeremyevans.net</email>
</author>
<published>2022-03-25T20:11:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=aee36dd7880316a647ac2b3da98c2c1a14bf41c6'/>
<id>aee36dd7880316a647ac2b3da98c2c1a14bf41c6</id>
<content type='text'>
https://github.com/ruby/openssl/commit/e25fb0d0d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/openssl/commit/e25fb0d0d8
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/openssl] pkey: use EVP_PKEY_CTX_new_from_name() on OpenSSL 3.0</title>
<updated>2021-12-20T14:42:04+00:00</updated>
<author>
<name>Kazuki Yamaguchi</name>
<email>k@rhe.jp</email>
</author>
<published>2021-04-12T01:43:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ac757b218c66569be6789144b149d6d798c72d98'/>
<id>ac757b218c66569be6789144b149d6d798c72d98</id>
<content type='text'>
Replace EVP_PKEY_CTX_new_id() with the new EVP_PKEY_CTX_new_from_name()
which takes the algorithm name in a string instead of in an NID.

https://github.com/ruby/openssl/commit/d6535d13d1
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace EVP_PKEY_CTX_new_id() with the new EVP_PKEY_CTX_new_from_name()
which takes the algorithm name in a string instead of in an NID.

https://github.com/ruby/openssl/commit/d6535d13d1
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/openssl] pkey: assume a pkey always has public key components on OpenSSL 3.0</title>
<updated>2021-12-20T14:42:04+00:00</updated>
<author>
<name>Kazuki Yamaguchi</name>
<email>k@rhe.jp</email>
</author>
<published>2021-03-20T14:16:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=61e426ae059945088b2bf84cdf1c8bdef273f314'/>
<id>61e426ae059945088b2bf84cdf1c8bdef273f314</id>
<content type='text'>
OpenSSL 3.0's EVP_PKEY_get0() returns NULL for provider-backed pkeys.
This causes segfault because it was supposed to never return NULL
before.

We can't check the existence of public key components in this way on
OpenSSL 3.0. Let's just skip it for now.

https://github.com/ruby/openssl/commit/ccdb6f7bfa
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
OpenSSL 3.0's EVP_PKEY_get0() returns NULL for provider-backed pkeys.
This causes segfault because it was supposed to never return NULL
before.

We can't check the existence of public key components in this way on
OpenSSL 3.0. Let's just skip it for now.

https://github.com/ruby/openssl/commit/ccdb6f7bfa
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/openssl] engine: disable OpenSSL::Engine on OpenSSL 3.0</title>
<updated>2021-12-20T14:42:03+00:00</updated>
<author>
<name>Kazuki Yamaguchi</name>
<email>k@rhe.jp</email>
</author>
<published>2021-04-14T15:51:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b2fb503dabaf421997f20fa96cbf4e11e5d5206d'/>
<id>b2fb503dabaf421997f20fa96cbf4e11e5d5206d</id>
<content type='text'>
The entire ENGINE API is deprecated in OpenSSL 3.0 in favor of the new
"Provider" concept.

OpenSSL::Engine will not be defined when compiled with OpenSSL 3.0.
We would need a way to interact with providers from Ruby programs, but
since the concept is completely different from the ENGINE API, it will
not be through the current OpenSSL::Engine interface.

https://github.com/ruby/openssl/commit/69a27d8de4
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The entire ENGINE API is deprecated in OpenSSL 3.0 in favor of the new
"Provider" concept.

OpenSSL::Engine will not be defined when compiled with OpenSSL 3.0.
We would need a way to interact with providers from Ruby programs, but
since the concept is completely different from the ENGINE API, it will
not be through the current OpenSSL::Engine interface.

https://github.com/ruby/openssl/commit/69a27d8de4
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/openssl] pkey: use EVP_PKEY_dup() if available</title>
<updated>2021-12-20T14:42:01+00:00</updated>
<author>
<name>Kazuki Yamaguchi</name>
<email>k@rhe.jp</email>
</author>
<published>2021-04-22T07:33:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=df6589e418adb2a4018e40d53dab2fd5556ed41e'/>
<id>df6589e418adb2a4018e40d53dab2fd5556ed41e</id>
<content type='text'>
We can use it to implement OpenSSL::PKey::PKey#initialize_copy. This
should work on all key types, not just DH/DSA/EC/RSA types.

https://github.com/ruby/openssl/commit/66cd8cbaaf
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We can use it to implement OpenSSL::PKey::PKey#initialize_copy. This
should work on all key types, not just DH/DSA/EC/RSA types.

https://github.com/ruby/openssl/commit/66cd8cbaaf
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/openssl] pkey: allocate EVP_PKEY on #initialize</title>
<updated>2021-12-20T14:42:01+00:00</updated>
<author>
<name>Kazuki Yamaguchi</name>
<email>k@rhe.jp</email>
</author>
<published>2021-04-12T09:32:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=c1a36ebfda8ba570173e2844bc584786852e6190'/>
<id>c1a36ebfda8ba570173e2844bc584786852e6190</id>
<content type='text'>
Allocate an EVP_PKEY when the content is ready: when #initialize
or #initialize_copy is called, rather than when a T_DATA is allocated.
This is more natural because the lower level API has been deprecated
and an EVP_PKEY is becoming the minimum unit of handling keys.

https://github.com/ruby/openssl/commit/74f6c61756
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Allocate an EVP_PKEY when the content is ready: when #initialize
or #initialize_copy is called, rather than when a T_DATA is allocated.
This is more natural because the lower level API has been deprecated
and an EVP_PKEY is becoming the minimum unit of handling keys.

https://github.com/ruby/openssl/commit/74f6c61756
</pre>
</div>
</content>
</entry>
</feed>
