[openssl] master update

Richard Levitte levitte at openssl.org
Tue Mar 19 06:32:35 UTC 2019


The branch master has been updated
       via  93b1e74cbeaf117658dd1dfc868bd70d9f7ffc65 (commit)
      from  ce1415ed2ce15305356cd028bcf7b9bc688d6d5c (commit)


- Log -----------------------------------------------------------------
commit 93b1e74cbeaf117658dd1dfc868bd70d9f7ffc65
Author: Richard Levitte <levitte at openssl.org>
Date:   Sat Mar 16 12:07:35 2019 +0100

    Fix no-posix-io
    
    'openssl pkeyutl' uses stat() to determine the file size when signing using
    Ed25519/Ed448, and this was guarded with OPENSSL_NO_POSIX_IO.
    
    It is however arguable if stat() is a POSIX IO function, considering
    that it doesn't use file descriptors, and even more so since we use
    stat() elsewhere without that guard.
    
    This will allow test/recipes/20-test_pkeyutl.t to be able to do its
    work for Ed25519/Ed448 signature tests.
    
    Reviewed-by: Matt Caswell <matt at openssl.org>
    Reviewed-by: Paul Dale <paul.dale at oracle.com>
    (Merged from https://github.com/openssl/openssl/pull/8498)

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

Summary of changes:
 apps/pkeyutl.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/apps/pkeyutl.c b/apps/pkeyutl.c
index 0c27589..7f1e621 100644
--- a/apps/pkeyutl.c
+++ b/apps/pkeyutl.c
@@ -13,9 +13,7 @@
 #include <openssl/err.h>
 #include <openssl/pem.h>
 #include <openssl/evp.h>
-#ifndef OPENSSL_NO_POSIX_IO
-# include <sys/stat.h>
-#endif
+#include <sys/stat.h>
 
 #define KEY_NONE        0
 #define KEY_PRIVKEY     1
@@ -348,15 +346,12 @@ int pkeyutl_main(int argc, char **argv)
 
     if (pkey_op != EVP_PKEY_OP_DERIVE) {
         in = bio_open_default(infile, 'r', FORMAT_BINARY);
-#ifndef OPENSSL_NO_POSIX_IO
-        if (infile != NULL)
-        {
+        if (infile != NULL) {
             struct stat st;
 
             if (stat(infile, &st) == 0 && st.st_size <= INT_MAX)
                 filesize = (int)st.st_size;
         }
-#endif
         if (in == NULL)
             goto end;
     }


More information about the openssl-commits mailing list