[openssl] master update

tomas at openssl.org tomas at openssl.org
Thu Apr 22 15:43:40 UTC 2021


The branch master has been updated
       via  b5644c2a09d6fd1f44321d2e16bea43729d73114 (commit)
      from  309c6fbaceb907e5b596a158f0891f42e6694bc2 (commit)


- Log -----------------------------------------------------------------
commit b5644c2a09d6fd1f44321d2e16bea43729d73114
Author: Wolf <wolfwings at gmail.com>
Date:   Tue Apr 20 14:08:59 2021 -0500

    Force public key to be included unless explicitly excluded with -no_public
    
    Send this before the CLA was accepted, amending to re-trigger check.
    
    Reviewed-by: Matt Caswell <matt at openssl.org>
    Reviewed-by: Tomas Mraz <tomas at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/14947)

-----------------------------------------------------------------------

Summary of changes:
 apps/ec.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/apps/ec.c b/apps/ec.c
index 3d5371ccdc..5103838da0 100644
--- a/apps/ec.c
+++ b/apps/ec.c
@@ -211,10 +211,16 @@ int ec_main(int argc, char **argv)
         goto end;
     }
 
-    if (no_public
-        && !EVP_PKEY_set_int_param(eckey, OSSL_PKEY_PARAM_EC_INCLUDE_PUBLIC, 0)) {
-        BIO_printf(bio_err, "unable to disable public key encoding\n");
-        goto end;
+    if (no_public) {
+        if (!EVP_PKEY_set_int_param(eckey, OSSL_PKEY_PARAM_EC_INCLUDE_PUBLIC, 0)) {
+            BIO_printf(bio_err, "unable to disable public key encoding\n");
+            goto end;
+        }
+    } else {
+        if (!EVP_PKEY_set_int_param(eckey, OSSL_PKEY_PARAM_EC_INCLUDE_PUBLIC, 1)) {
+            BIO_printf(bio_err, "unable to enable public key encoding\n");
+            goto end;
+        }
     }
 
     if (text) {


More information about the openssl-commits mailing list