]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
apps/lib/apps.c: remove HARNESS_OSSL_PREFIX envvar handling
authorEugene Syromiatnikov <esyr@openssl.org>
Mon, 21 Jul 2025 11:37:16 +0000 (13:37 +0200)
committerNeil Horman <nhorman@openssl.org>
Tue, 29 Jul 2025 17:12:10 +0000 (13:12 -0400)
As the environment variable is no longer used by the test harness,
its support can be removed from the openssl command, along
with the possible unintended consequences of prefixing the standard
output of the openssl command with an arbitrary string set
in the environment.

Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28025)

apps/lib/apps.c

index a6278f6745e232e67ae0cb7985f3912d068d294a..f005d71ddeac4bc4e3d6ae91c564b7e69ce3c380 100644 (file)
@@ -3047,15 +3047,11 @@ BIO *dup_bio_out(int format)
 {
     BIO *b = BIO_new_fp(stdout,
                         BIO_NOCLOSE | (FMT_istext(format) ? BIO_FP_TEXT : 0));
-    void *prefix = NULL;
-    BIO *btmp;
-
-    if (b == NULL)
-        return NULL;
 
 #ifdef OPENSSL_SYS_VMS
-    if (FMT_istext(format)) {
-        btmp = BIO_new(BIO_f_linebuffer());
+    if (b != NULL && FMT_istext(format)) {
+        BIO *btmp = BIO_new(BIO_f_linebuffer());
+
         if (btmp == NULL) {
             BIO_free(b);
             return NULL;
@@ -3064,17 +3060,6 @@ BIO *dup_bio_out(int format)
     }
 #endif
 
-    if (FMT_istext(format)
-        && (prefix = getenv("HARNESS_OSSL_PREFIX")) != NULL) {
-        btmp = BIO_new(BIO_f_prefix());
-        if (btmp == NULL) {
-            BIO_free_all(b);
-            return NULL;
-        }
-        b = BIO_push(btmp, b);
-        BIO_set_prefix(b, prefix);
-    }
-
     return b;
 }