<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/test/openssl/utils.rb, branch v3_3_11</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>Fix test_pkey_dh.rb in FIPS.</title>
<updated>2023-11-25T10:12:28+00:00</updated>
<author>
<name>Jun Aruga</name>
<email>jaruga@redhat.com</email>
</author>
<published>2023-11-07T13:36:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=543dd74049f18db2f8dd9ac05b25f8dbff2edc14'/>
<id>543dd74049f18db2f8dd9ac05b25f8dbff2edc14</id>
<content type='text'>
We use dh2048_ffdhe2048.pem file (DH 2048 bits) instead of dh1024.pem file in
both non-FIPS and FIPS cases. Because the following command fails to generate
the pem file with 1024 bits. And the OpenSSL FIPS 140-2 security policy
document explains the DH public keys are allowed from 2048 bits.[1]

```
$ OPENSSL_CONF=/home/jaruga/.local/openssl-3.3.0-dev-fips-debug-1aa08644ec/ssl/openssl_fips.cnf \
  /home/jaruga/.local/openssl-3.3.0-dev-fips-debug-1aa08644ec/bin/openssl \
  dhparam -out dh1024.pem 1024
Generating DH parameters, 1024 bit long safe prime
dhparam: Generating DH key parameters failed
```

The dh2048_ffdhe2048.pem file was created by the following command with the
OpenSSL FIPS configuration file. The logic to generate the DH pem file is
different between non-FIPS and FIPS cases. In FIPS, it seems that the command
always returns the text defined as ffdhe2048 in the FFDHE groups in RFC 7919
unlike non-FIPS.[2]

As the generated pem file is a normal and valid PKCS#3-style group parameter, we
use the file for the non-FIPS case too.

```
$ OPENSSL_CONF=/home/jaruga/.local/openssl-3.3.0-dev-fips-debug-1aa08644ec/ssl/openssl_fips.cnf \
  /home/jaruga/.local/openssl-3.3.0-dev-fips-debug-1aa08644ec/bin/openssl \
  dhparam -out dh2048_ffdhe2048.pem 2048
```

Note that the hard-coded PEM-encoded string in the `test_DHparams` is
intentional to avoid modifying the content unintentionally.

* [1] https://www.openssl.org/source/ - OpenSSL 3.0.8 FIPS 140-2 security
  policy document page 25, Table 10 – Public Keys - DH Public
  - DH (2048/3072/4096/6144/8192) public key agreement key
* [2] RFC7919 - Appendix A.1: ffdhe2048
  https://www.rfc-editor.org/rfc/rfc7919#appendix-A.1
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We use dh2048_ffdhe2048.pem file (DH 2048 bits) instead of dh1024.pem file in
both non-FIPS and FIPS cases. Because the following command fails to generate
the pem file with 1024 bits. And the OpenSSL FIPS 140-2 security policy
document explains the DH public keys are allowed from 2048 bits.[1]

```
$ OPENSSL_CONF=/home/jaruga/.local/openssl-3.3.0-dev-fips-debug-1aa08644ec/ssl/openssl_fips.cnf \
  /home/jaruga/.local/openssl-3.3.0-dev-fips-debug-1aa08644ec/bin/openssl \
  dhparam -out dh1024.pem 1024
Generating DH parameters, 1024 bit long safe prime
dhparam: Generating DH key parameters failed
```

The dh2048_ffdhe2048.pem file was created by the following command with the
OpenSSL FIPS configuration file. The logic to generate the DH pem file is
different between non-FIPS and FIPS cases. In FIPS, it seems that the command
always returns the text defined as ffdhe2048 in the FFDHE groups in RFC 7919
unlike non-FIPS.[2]

As the generated pem file is a normal and valid PKCS#3-style group parameter, we
use the file for the non-FIPS case too.

```
$ OPENSSL_CONF=/home/jaruga/.local/openssl-3.3.0-dev-fips-debug-1aa08644ec/ssl/openssl_fips.cnf \
  /home/jaruga/.local/openssl-3.3.0-dev-fips-debug-1aa08644ec/bin/openssl \
  dhparam -out dh2048_ffdhe2048.pem 2048
```

Note that the hard-coded PEM-encoded string in the `test_DHparams` is
intentional to avoid modifying the content unintentionally.

* [1] https://www.openssl.org/source/ - OpenSSL 3.0.8 FIPS 140-2 security
  policy document page 25, Table 10 – Public Keys - DH Public
  - DH (2048/3072/4096/6144/8192) public key agreement key
* [2] RFC7919 - Appendix A.1: ffdhe2048
  https://www.rfc-editor.org/rfc/rfc7919#appendix-A.1
</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>Use the test-unit-ruby-core gem for Test::Unit::CoreAssertions</title>
<updated>2023-09-06T10:51:53+00:00</updated>
<author>
<name>Kazuki Yamaguchi</name>
<email>k@rhe.jp</email>
</author>
<published>2023-08-29T09:26:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=5ba480e4eab7f0660a11bb21044aa4077aedf7d1'/>
<id>5ba480e4eab7f0660a11bb21044aa4077aedf7d1</id>
<content type='text'>
test/lib/core_assertions.rb and its dependencies are now packaged in
the gem test-unit-ruby-core. Let's use it instead.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
test/lib/core_assertions.rb and its dependencies are now packaged in
the gem test-unit-ruby-core. Let's use it instead.
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/openssl] Remove OSSL_DEBUG compile-time option</title>
<updated>2023-09-06T10:20:57+00:00</updated>
<author>
<name>Kazuki Yamaguchi</name>
<email>k@rhe.jp</email>
</author>
<published>2023-08-31T12:34:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=912f1cda0d2ddfb4e6a52d43952a0562cb0fb46d'/>
<id>912f1cda0d2ddfb4e6a52d43952a0562cb0fb46d</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</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] Drop a common logic disabling the FIPS mode in the tests.</title>
<updated>2023-06-18T16:57:09+00:00</updated>
<author>
<name>Jun Aruga</name>
<email>jaruga@redhat.com</email>
</author>
<published>2023-04-13T15:28:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=920bc71284f417f9044b0dc1822b1d29a8fc61e5'/>
<id>920bc71284f417f9044b0dc1822b1d29a8fc61e5</id>
<content type='text'>
We want to run the unit tests in the FIPS mode too.

https://github.com/ruby/openssl/commit/ab92baff34
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We want to run the unit tests in the FIPS mode too.

https://github.com/ruby/openssl/commit/ab92baff34
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/openssl] Added CoreAssertions</title>
<updated>2023-01-27T02:30:13+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2023-01-04T08:28:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=967dec5d619f2a416f94a623abd91d7d0ee99751'/>
<id>967dec5d619f2a416f94a623abd91d7d0ee99751</id>
<content type='text'>
https://github.com/ruby/openssl/commit/520601e11d

  This commits swtich to use ruby/ruby's envutil.rb instead of
  vendored in openssl repo.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/openssl/commit/520601e11d

  This commits swtich to use ruby/ruby's envutil.rb instead of
  vendored in openssl repo.
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/openssl] test/openssl/test_ssl: assume ECC support</title>
<updated>2021-10-23T04:38:37+00:00</updated>
<author>
<name>Kazuki Yamaguchi</name>
<email>k@rhe.jp</email>
</author>
<published>2021-09-27T06:34:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=5a8e1c520ac71c76f6424f9ef5aef64a79527f78'/>
<id>5a8e1c520ac71c76f6424f9ef5aef64a79527f78</id>
<content type='text'>
Disabling ECC support of OpenSSL is impractical nowadays.

We still try to have the C extension compile on no-ec builds (as well
as no-dh or no-engine, etc.) as long as we can, but keeping test cases
for such an extreme scenario is not worth the effort.

https://github.com/ruby/openssl/commit/2cd01d4676
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Disabling ECC support of OpenSSL is impractical nowadays.

We still try to have the C extension compile on no-ec builds (as well
as no-dh or no-engine, etc.) as long as we can, but keeping test cases
for such an extreme scenario is not worth the effort.

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