<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/test/openssl/test_pkey.rb, branch v3_4_9</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] Check for compatible openssl versions earlier</title>
<updated>2024-11-22T17:26:02+00:00</updated>
<author>
<name>Josh Cooper</name>
<email>joshcooper@users.noreply.github.com</email>
</author>
<published>2024-11-04T16:41:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ce4906efb3e304567f67a129ab65a86e081cd2ea'/>
<id>ce4906efb3e304567f67a129ab65a86e081cd2ea</id>
<content type='text'>
test_pkey wasn't checking for libressl as is done elsewhere.

Note the libressl version check is different when testing pkey, because
PKey#sign relies on EVP_PKey_sign, whereas signing an X509 cert/request/crl
relies on ASN1_item_sign.

https://github.com/ruby/openssl/commit/f1db5c88a2
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
test_pkey wasn't checking for libressl as is done elsewhere.

Note the libressl version check is different when testing pkey, because
PKey#sign relies on EVP_PKey_sign, whereas signing an X509 cert/request/crl
relies on ASN1_item_sign.

https://github.com/ruby/openssl/commit/f1db5c88a2
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/openssl] Remove test_ed25519_not_approved_on_fips.</title>
<updated>2024-08-16T17:10:23+00:00</updated>
<author>
<name>Jun Aruga</name>
<email>jaruga@redhat.com</email>
</author>
<published>2024-08-16T10:01:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=1917c8c8f333c2c39b575f47a17e74f4024f6051'/>
<id>1917c8c8f333c2c39b575f47a17e74f4024f6051</id>
<content type='text'>
This commit fixes the following failure on OpenSSL master FIPS case.

```
1) Failure: test_ed25519_not_approved_on_fips(OpenSSL::TestPKey): OpenSSL::PKey::PKeyError expected but nothing was raised.
/home/runner/work/openssl/openssl/vendor/bundle/ruby/3.0.0/gems/test-unit-ruby-core-1.0.6/lib/core_assertions.rb:462:in `assert_raise'
/home/runner/work/openssl/openssl/test/openssl/test_pkey.rb:174:in `test_ed25519_not_approved_on_fips'
     171:     MC4CAQAwBQYDK2VwBCIEIEzNCJso/5banbbDRuwRTg9bijGfNaumJNqM9u1PuKb7
     172:     -----END PRIVATE KEY-----
     173:     EOF
  =&gt; 174:     assert_raise(OpenSSL::PKey::PKeyError) do
     175:       OpenSSL::PKey.read(priv_pem)
     176:     end
     177:   end
```

Because FIPS compliance is a continually moving target. According to the [1],
FIPS 140-3 *currently* allows ED25519. The ED25519 is allowed again with the
latest OpenSSL FIPS by the commit [2], while it is not allowed in OpenSSL stable
version 3.x FIPS.

Remove this test because we want to keep our tests stable.

[1] https://github.com/openssl/openssl/discussions/22054
[2] https://github.com/openssl/openssl/commit/5f04124aab4a477d4e58149d8f04871ff7e5ea4b

https://github.com/ruby/openssl/commit/d43904b834
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit fixes the following failure on OpenSSL master FIPS case.

```
1) Failure: test_ed25519_not_approved_on_fips(OpenSSL::TestPKey): OpenSSL::PKey::PKeyError expected but nothing was raised.
/home/runner/work/openssl/openssl/vendor/bundle/ruby/3.0.0/gems/test-unit-ruby-core-1.0.6/lib/core_assertions.rb:462:in `assert_raise'
/home/runner/work/openssl/openssl/test/openssl/test_pkey.rb:174:in `test_ed25519_not_approved_on_fips'
     171:     MC4CAQAwBQYDK2VwBCIEIEzNCJso/5banbbDRuwRTg9bijGfNaumJNqM9u1PuKb7
     172:     -----END PRIVATE KEY-----
     173:     EOF
  =&gt; 174:     assert_raise(OpenSSL::PKey::PKeyError) do
     175:       OpenSSL::PKey.read(priv_pem)
     176:     end
     177:   end
```

Because FIPS compliance is a continually moving target. According to the [1],
FIPS 140-3 *currently* allows ED25519. The ED25519 is allowed again with the
latest OpenSSL FIPS by the commit [2], while it is not allowed in OpenSSL stable
version 3.x FIPS.

Remove this test because we want to keep our tests stable.

[1] https://github.com/openssl/openssl/discussions/22054
[2] https://github.com/openssl/openssl/commit/5f04124aab4a477d4e58149d8f04871ff7e5ea4b

https://github.com/ruby/openssl/commit/d43904b834
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/openssl] test_s_generate_parameters: Consider a DSA error in FIPS.</title>
<updated>2024-08-16T06:09:15+00:00</updated>
<author>
<name>Jun Aruga</name>
<email>jaruga@redhat.com</email>
</author>
<published>2024-08-15T14:20:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=08db4bc672eea0426c786ceece3545ac44eccad6'/>
<id>08db4bc672eea0426c786ceece3545ac44eccad6</id>
<content type='text'>
DSA kengen is not FIPS-approved. The `EVP_PKEY_paramgen` in the
`OpenSSL::PKey.generate_parameters("DSA")` raises a DSA error in FIPS by the
following commit. Split the test for DSA.

https://github.com/openssl/openssl/commit/49a35f0#diff-605396c063194975af8ce31399d42690ab18186b422fb5012101cc9132660fe1R611-R614

https://github.com/ruby/openssl/commit/5ca6eb4eca
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
DSA kengen is not FIPS-approved. The `EVP_PKEY_paramgen` in the
`OpenSSL::PKey.generate_parameters("DSA")` raises a DSA error in FIPS by the
following commit. Split the test for DSA.

https://github.com/openssl/openssl/commit/49a35f0#diff-605396c063194975af8ce31399d42690ab18186b422fb5012101cc9132660fe1R611-R614

https://github.com/ruby/openssl/commit/5ca6eb4eca
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/openssl] test_pkey.rb: Refactor the test_ed25519 on FIPS.</title>
<updated>2023-09-21T18:04:55+00:00</updated>
<author>
<name>Jun Aruga</name>
<email>jaruga@redhat.com</email>
</author>
<published>2023-09-19T17:54:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=f370c4dc033ee2ac112343b37144fcdafd254fa3'/>
<id>f370c4dc033ee2ac112343b37144fcdafd254fa3</id>
<content type='text'>
* Split the test in the FIPS case as another test.
* test/openssl/utils.rb: Add omit_on_fips and omit_on_non_fips methods.

https://github.com/ruby/openssl/commit/4d64c38ed0
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Split the test in the FIPS case as another test.
* test/openssl/utils.rb: Add omit_on_fips and omit_on_non_fips methods.

https://github.com/ruby/openssl/commit/4d64c38ed0
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/openssl] Remove the pending logics by the pend_on_openssl_issue_21493.</title>
<updated>2023-08-28T03:05:32+00:00</updated>
<author>
<name>Jun Aruga</name>
<email>jaruga@redhat.com</email>
</author>
<published>2023-08-22T18:31:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=69d9fda9f5b579c6992621f4cd165cd3ca7b4b3e'/>
<id>69d9fda9f5b579c6992621f4cd165cd3ca7b4b3e</id>
<content type='text'>
Because we will add a workaround to avoid this issue.

https://github.com/ruby/openssl/commit/d157ba1d3b
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Because we will add a workaround to avoid this issue.

https://github.com/ruby/openssl/commit/d157ba1d3b
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/openssl] test/openssl/test_pkey.rb: Fix pending tests in FIPS case.</title>
<updated>2023-08-16T05:48:42+00:00</updated>
<author>
<name>Jun Aruga</name>
<email>jaruga@redhat.com</email>
</author>
<published>2023-08-09T18:35:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=f5ca8d0e3149098e4b6c4a14d129268ec43c71d5'/>
<id>f5ca8d0e3149098e4b6c4a14d129268ec43c71d5</id>
<content type='text'>
https://github.com/ruby/openssl/commit/f9980d88aa
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/openssl/commit/f9980d88aa
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/openssl] Use openssl? instead of OpenSSL::OPENSSL_VERSION_NUMBER.</title>
<updated>2023-08-16T05:48:42+00:00</updated>
<author>
<name>Jun Aruga</name>
<email>jaruga@redhat.com</email>
</author>
<published>2023-08-14T15:13:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=8ca0d53fd09b2032d990b0ab92ec63f408861dbc'/>
<id>8ca0d53fd09b2032d990b0ab92ec63f408861dbc</id>
<content type='text'>
Update the `openssl?` method by adding status argument.

Note the format is below.

* OpenSSL 3: 0xMNN00PP0 (major minor 00 patch 0)
* OpenSSL 1: 0xMNNFFPPS (major minor fix patch status)

See &lt;https://www.openssl.org/docs/man1.1.1/man3/OPENSSL_VERSION_NUMBER.html&gt;
for details.

https://github.com/ruby/openssl/commit/db8deaacd3
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Update the `openssl?` method by adding status argument.

Note the format is below.

* OpenSSL 3: 0xMNN00PP0 (major minor 00 patch 0)
* OpenSSL 1: 0xMNNFFPPS (major minor fix patch status)

See &lt;https://www.openssl.org/docs/man1.1.1/man3/OPENSSL_VERSION_NUMBER.html&gt;
for details.

https://github.com/ruby/openssl/commit/db8deaacd3
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/openssl] Add support for raw private/public keys</title>
<updated>2023-07-12T14:40:58+00:00</updated>
<author>
<name>Ryo Kajiwara</name>
<email>sylph01@gmail.com</email>
</author>
<published>2023-07-12T13:06:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=4b6d667c63481abd17ce5446bceb053c0881739f'/>
<id>4b6d667c63481abd17ce5446bceb053c0881739f</id>
<content type='text'>
(https://github.com/ruby/openssl/pull/646)

Add OpenSSL::PKey.new_raw_private_key, #raw_private_key and public
equivalents. These methods are useful for importing and exporting keys
that support "raw private/public key". Currently, OpenSSL implements
X25519/X448 and Ed25519/Ed448 keys.

[rhe: rewrote commit message]

https://github.com/ruby/openssl/commit/3f29525618

Co-authored-by: Bart de Water &lt;bartdewater@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(https://github.com/ruby/openssl/pull/646)

Add OpenSSL::PKey.new_raw_private_key, #raw_private_key and public
equivalents. These methods are useful for importing and exporting keys
that support "raw private/public key". Currently, OpenSSL implements
X25519/X448 and Ed25519/Ed448 keys.

[rhe: rewrote commit message]

https://github.com/ruby/openssl/commit/3f29525618

Co-authored-by: Bart de Water &lt;bartdewater@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/openssl] CI: Add the test/openssl/test_pkey.rb on the FIPS mode case.</title>
<updated>2023-06-18T16:57:09+00:00</updated>
<author>
<name>Jun Aruga</name>
<email>jaruga@redhat.com</email>
</author>
<published>2023-04-17T17:05:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=366d8005b100d83a711234b2aa6176810bad2525'/>
<id>366d8005b100d83a711234b2aa6176810bad2525</id>
<content type='text'>
It's to test the `OpenSSL::PKey.read` in the `test/openssl/test_pkey.rb`.

I added the pending status to the following tests failing on the FIPS mode
case in the `test/openssl/test_pkey.rb`.

* `test_ed25519`
* `test_x25519`
* `test_compare?`

https://github.com/ruby/openssl/commit/8149cdf6e8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It's to test the `OpenSSL::PKey.read` in the `test/openssl/test_pkey.rb`.

I added the pending status to the following tests failing on the FIPS mode
case in the `test/openssl/test_pkey.rb`.

* `test_ed25519`
* `test_x25519`
* `test_compare?`

https://github.com/ruby/openssl/commit/8149cdf6e8
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/openssl] test/openssl/test_pkey.rb: allow failures in test_s_generate_parameters</title>
<updated>2022-12-26T06:09:21+00:00</updated>
<author>
<name>Kazuki Yamaguchi</name>
<email>k@rhe.jp</email>
</author>
<published>2022-12-23T17:02:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=24c9adcaebf8ffaaf3f4eb68fe43f2ff23688543'/>
<id>24c9adcaebf8ffaaf3f4eb68fe43f2ff23688543</id>
<content type='text'>
Commit https://github.com/ruby/openssl/commit/f2e2a5e5ed8e ("test/openssl/test_pkey.rb: allow failures in
test_s_generate_parameters", 2022-12-23) was completely bogus. The
problem in OpenSSL 3.0.0-3.0.5 is that errors from the callback are
sometimes silently suppressed.

https://github.com/ruby/openssl/commit/ccc1594492
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit https://github.com/ruby/openssl/commit/f2e2a5e5ed8e ("test/openssl/test_pkey.rb: allow failures in
test_s_generate_parameters", 2022-12-23) was completely bogus. The
problem in OpenSSL 3.0.0-3.0.5 is that errors from the callback are
sometimes silently suppressed.

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