]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
crypto: disable OSSL_PARAM_REAL on UEFI
authorGerd Hoffmann <kraxel@redhat.com>
Mon, 7 Apr 2025 10:58:54 +0000 (12:58 +0200)
committerMatt Caswell <matt@openssl.org>
Tue, 15 Apr 2025 14:27:38 +0000 (15:27 +0100)
Floating point types like double can't be used on UEFI.
Fix build on UEFI by disabling the OSSL_PARAM_REAL branch.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27284)

crypto/params_from_text.c

index 7532d4d43923f4c9ff194f076b6d285f8dd52e5f..fb25400dc123a034d98bfd392fa99ebc2b3defbc 100644 (file)
@@ -220,9 +220,9 @@ int OSSL_PARAM_print_to_bio(const OSSL_PARAM *p, BIO *bio, int print_values)
     BIGNUM *bn;
 #ifndef OPENSSL_SYS_UEFI
     double d;
+    int dok;
 #endif
     int ok = -1;
-    int dok;
 
     /*
      * Iterate through each key in the array printing its key and value
@@ -280,16 +280,16 @@ int OSSL_PARAM_print_to_bio(const OSSL_PARAM *p, BIO *bio, int print_values)
         case OSSL_PARAM_OCTET_STRING:
             ok = BIO_dump(bio, (char *)p->data, p->data_size);
             break;
+#ifndef OPENSSL_SYS_UEFI
         case OSSL_PARAM_REAL:
             dok = 0;
-#ifndef OPENSSL_SYS_UEFI
             dok = OSSL_PARAM_get_double(p, &d);
-#endif
             if (dok == 1)
                 ok = BIO_printf(bio, "%f\n", d);
             else
                 ok = BIO_printf(bio, "error getting value\n");
             break;
+#endif
         default:
             ok = BIO_printf(bio, "unknown type (%u) of %zu bytes\n",
                             p->data_type, p->data_size);