public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Tomas Mraz <tmraz@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/openssl] rebase_40beta: Additional FIPS mode check for EC key generation
Date: Tue, 09 Jun 2026 12:44:50 GMT	[thread overview]
Message-ID: <178100909009.1.14326829899887263796.rpms-openssl-067d5800f275@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/openssl
Branch : rebase_40beta
Commit : 067d5800f275012076e66cb3ed4dc0d6edab05df
Author : Tomas Mraz <tmraz@fedoraproject.org>
Date   : 2020-07-20T14:51:05+02:00
Stats  : +30/-4 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/openssl/c/067d5800f275012076e66cb3ed4dc0d6edab05df?branch=rebase_40beta

Log:
Additional FIPS mode check for EC key generation

---
diff --git a/openssl-1.1.1-fips-dh.patch b/openssl-1.1.1-fips-dh.patch
index d827a8a..d98372e 100644
--- a/openssl-1.1.1-fips-dh.patch
+++ b/openssl-1.1.1-fips-dh.patch
@@ -2388,9 +2388,29 @@ diff -up openssl-1.1.1g/crypto/dh/dh_rfc7919.c.fips-dh openssl-1.1.1g/crypto/dh/
 +}
 +
 diff -up openssl-1.1.1g/crypto/ec/ec_key.c.fips-dh openssl-1.1.1g/crypto/ec/ec_key.c
---- openssl-1.1.1g/crypto/ec/ec_key.c.fips-dh	2020-07-17 10:36:29.183787931 +0200
-+++ openssl-1.1.1g/crypto/ec/ec_key.c	2020-07-17 10:36:29.247788458 +0200
-@@ -296,8 +296,20 @@ int ec_key_simple_generate_key(EC_KEY *e
+--- openssl-1.1.1g/crypto/ec/ec_key.c.fips-dh	2020-07-17 11:00:53.958175227 +0200
++++ openssl-1.1.1g/crypto/ec/ec_key.c	2020-07-20 13:24:03.941107320 +0200
+@@ -280,9 +280,18 @@ int ec_key_simple_generate_key(EC_KEY *e
+     if (!EC_POINT_mul(eckey->group, pub_key, priv_key, NULL, NULL, ctx))
+         goto err;
+ 
+-    eckey->priv_key = priv_key;
+     eckey->pub_key = pub_key;
+ 
++    if (FIPS_mode()) {
++        eckey->priv_key = NULL;
++        if (EC_KEY_check_key(eckey) <= 0) {
++            eckey->pub_key = NULL;
++            goto err;
++        }
++    }
++
++    eckey->priv_key = priv_key;
++
+     ok = 1;
+ 
+  err:
+@@ -296,8 +305,23 @@ int ec_key_simple_generate_key(EC_KEY *e
  
  int ec_key_simple_generate_public_key(EC_KEY *eckey)
  {
@@ -2408,6 +2428,9 @@ diff -up openssl-1.1.1g/crypto/ec/ec_key.c.fips-dh openssl-1.1.1g/crypto/ec/ec_k
 +    ret = EC_KEY_check_key(eckey);
 +    eckey->priv_key = priv_key;
 +
++    if (ret <= 0)
++        EC_POINT_set_to_infinity(eckey->group, eckey->pub_key);
++
 +    return ret;
  }
  

diff --git a/openssl.spec b/openssl.spec
index 220df7c..7ab3ea6 100644
--- a/openssl.spec
+++ b/openssl.spec
@@ -22,7 +22,7 @@
 Summary: Utilities from the general purpose cryptography library with TLS implementation
 Name: openssl
 Version: 1.1.1g
-Release: 12%{?dist}
+Release: 13%{?dist}
 Epoch: 1
 # We have to remove certain patented algorithms from the openssl source
 # tarball with the hobble-openssl script which is included below.
@@ -475,6 +475,9 @@ export LD_LIBRARY_PATH
 %ldconfig_scriptlets libs
 
 %changelog
+* Mon Jul 20 2020 Tomáš Mráz <tmraz@redhat.com> 1.1.1g-13
+- Additional FIPS mode check for EC key generation
+
 * Fri Jul 17 2020 Tomáš Mráz <tmraz@redhat.com> 1.1.1g-12
 - Further changes for SP 800-56A rev3 requirements
 

                 reply	other threads:[~2026-06-09 12:44 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178100909009.1.14326829899887263796.rpms-openssl-067d5800f275@fedoraproject.org \
    --to=tmraz@fedoraproject.org \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox