[openssl] openssl-3.0 update

tomas at openssl.org tomas at openssl.org
Fri Jan 21 11:45:26 UTC 2022


The branch openssl-3.0 has been updated
       via  a28dbfe7c84b6a43746d0e2ef4153e2a13067c4a (commit)
       via  4d5447fe9222a72f6289fcb9c09b7daa91e528a9 (commit)
      from  3d046c4d047a55123beeceffe9f8bae09159445e (commit)


- Log -----------------------------------------------------------------
commit a28dbfe7c84b6a43746d0e2ef4153e2a13067c4a
Author: Gerd Hoffmann <kraxel at redhat.com>
Date:   Wed Jan 12 10:30:15 2022 +0100

    crypto/bio: drop float formating for UEFI
    
    Using floating point is not supported in UEFI and can cause build
    problems, for example due to SSE being disabled and x64 calling
    convention passing floats in SSE registers.
    
    Avoid those problems by not compiling the formating code for floating
    point numbers.
    
    Signed-off-by: Gerd Hoffmann <kraxel at redhat.com>
    
    Reviewed-by: Paul Dale <pauli at openssl.org>
    Reviewed-by: Tomas Mraz <tomas at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/17547)
    
    (cherry picked from commit f59d72f027da90edcccad5cc78c94d3099fadecf)

commit 4d5447fe9222a72f6289fcb9c09b7daa91e528a9
Author: Gerd Hoffmann <kraxel at redhat.com>
Date:   Wed Jan 12 12:35:16 2022 +0100

    Revert "crypto/bio: fix build on UEFI"
    
    This reverts commit 328bf5adf9e23da523d4195db309083aa02403c4.
    
    Turned out it isn't that simple, the fix is incomplete.
    So revert and try again with another approach.
    
    Signed-off-by: Gerd Hoffmann <kraxel at redhat.com>
    
    Reviewed-by: Paul Dale <pauli at openssl.org>
    Reviewed-by: Tomas Mraz <tomas at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/17547)
    
    (cherry picked from commit 619c9bad41d041bab2ac6ba3933d526b48ceee2a)

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

Summary of changes:
 crypto/bio/bio_print.c | 27 +++++++++++++++++++--------
 1 file changed, 19 insertions(+), 8 deletions(-)

diff --git a/crypto/bio/bio_print.c b/crypto/bio/bio_print.c
index 60b28c61ff..101c2a841a 100644
--- a/crypto/bio/bio_print.c
+++ b/crypto/bio/bio_print.c
@@ -32,8 +32,10 @@ static int fmtstr(char **, char **, size_t *, size_t *,
                   const char *, int, int, int);
 static int fmtint(char **, char **, size_t *, size_t *,
                   int64_t, int, int, int, int);
+#ifndef OPENSSL_SYS_UEFI
 static int fmtfp(char **, char **, size_t *, size_t *,
                  LDOUBLE, int, int, int, int);
+#endif
 static int doapr_outch(char **, char **, size_t *, size_t *, int);
 static int _dopr(char **sbuffer, char **buffer,
                  size_t *maxlen, size_t *retlen, int *truncated,
@@ -89,7 +91,9 @@ _dopr(char **sbuffer,
 {
     char ch;
     int64_t value;
+#ifndef OPENSSL_SYS_UEFI
     LDOUBLE fvalue;
+#endif
     char *strvalue;
     int min;
     int max;
@@ -260,6 +264,7 @@ _dopr(char **sbuffer,
                             min, max, flags))
                     return 0;
                 break;
+#ifndef OPENSSL_SYS_UEFI
             case 'f':
                 if (cflags == DP_C_LDOUBLE)
                     fvalue = va_arg(args, LDOUBLE);
@@ -293,6 +298,16 @@ _dopr(char **sbuffer,
                            flags, G_FORMAT))
                     return 0;
                 break;
+#else
+            case 'f':
+            case 'E':
+            case 'e':
+            case 'G':
+            case 'g':
+                /* not implemented for UEFI */
+                ERR_raise(ERR_LIB_BIO, ERR_R_UNSUPPORTED);
+                return 0;
+#endif
             case 'c':
                 if (!doapr_outch(sbuffer, buffer, &currlen, maxlen,
                                  va_arg(args, int)))
@@ -513,11 +528,9 @@ fmtint(char **sbuffer,
     return 1;
 }
 
-#ifdef OPENSSL_SYS_UEFI
-static LDOUBLE EFIAPI abs_val(LDOUBLE value)
-#else
+#ifndef OPENSSL_SYS_UEFI
+
 static LDOUBLE abs_val(LDOUBLE value)
-#endif
 {
     LDOUBLE result = value;
     if (value < 0)
@@ -525,11 +538,7 @@ static LDOUBLE abs_val(LDOUBLE value)
     return result;
 }
 
-#ifdef OPENSSL_SYS_UEFI
-static LDOUBLE EFIAPI pow_10(int in_exp)
-#else
 static LDOUBLE pow_10(int in_exp)
-#endif
 {
     LDOUBLE result = 1;
     while (in_exp) {
@@ -816,6 +825,8 @@ fmtfp(char **sbuffer,
     return 1;
 }
 
+#endif /* OPENSSL_SYS_UEFI */
+
 #define BUFFER_INC  1024
 
 static int


More information about the openssl-commits mailing list