899f2ba
diff -up openssl-1.1.0g/apps/app_rand.c.silent-rnd-write openssl-1.1.0g/apps/app_rand.c
899f2ba
--- openssl-1.1.0g/apps/app_rand.c.silent-rnd-write	2017-05-25 14:46:17.000000000 +0200
899f2ba
+++ openssl-1.1.0g/apps/app_rand.c	2018-01-11 18:05:32.332703425 +0100
899f2ba
@@ -91,6 +91,7 @@ long app_RAND_load_files(char *name)
899f2ba
 int app_RAND_write_file(const char *file)
899f2ba
 {
899f2ba
     char buffer[200];
899f2ba
+    const char *origfile = file;
899f2ba
 
899f2ba
     if (egdsocket || !seeded)
899f2ba
         /*
899f2ba
@@ -103,8 +104,10 @@ int app_RAND_write_file(const char *file
899f2ba
     if (file == NULL)
899f2ba
         file = RAND_file_name(buffer, sizeof buffer);
899f2ba
     if (file == NULL || !RAND_write_file(file)) {
899f2ba
-        BIO_printf(bio_err, "unable to write 'random state'\n");
899f2ba
-        return 0;
899f2ba
+        if (origfile != NULL) {
899f2ba
+            BIO_printf(bio_err, "unable to write 'random state'\n");
899f2ba
+            return 0;
899f2ba
+        }
899f2ba
     }
899f2ba
     return 1;
899f2ba
 }