Commit 0f81f5f7 authored by Richard Levitte's avatar Richard Levitte
Browse files

Have the test executables output in text mode

The test executables use standard output and standard error for text output,
so let's open the corresponding BIOs in text mode.

Reviewed-by: default avatarTim Hudson <tjh@openssl.org>
parent bdd58d98
Loading
Loading
Loading
Loading
+1 −1
Changes for test/bntest.c: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -168,7 +168,7 @@ int main(int argc, char *argv[])
    if (out == NULL)
        EXIT(1);
    if (outfile == NULL) {
        BIO_set_fp(out, stdout, BIO_NOCLOSE);
        BIO_set_fp(out, stdout, BIO_NOCLOSE | BIO_FP_TEXT);
    } else {
        if (!BIO_write_filename(out, outfile)) {
            perror(outfile);
+1 −1
Changes for test/dhtest.c: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -107,7 +107,7 @@ int main(int argc, char *argv[])
    out = BIO_new(BIO_s_file());
    if (out == NULL)
        EXIT(1);
    BIO_set_fp(out, stdout, BIO_NOCLOSE);
    BIO_set_fp(out, stdout, BIO_NOCLOSE | BIO_FP_TEXT);

    _cb = BN_GENCB_new();
    if (!_cb)
+1 −1
Changes for test/dsatest.c: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -136,7 +136,7 @@ int main(int argc, char **argv)
    unsigned int siglen;

    if (bio_err == NULL)
        bio_err = BIO_new_fp(stderr, BIO_NOCLOSE);
        bio_err = BIO_new_fp(stderr, BIO_NOCLOSE | BIO_FP_TEXT);

    CRYPTO_malloc_debug_init();
    CRYPTO_dbg_set_options(V_CRYPTO_MDEBUG_ALL);
+1 −1
Changes for test/ecdhtest.c: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -466,7 +466,7 @@ int main(int argc, char *argv[])
    out = BIO_new(BIO_s_file());
    if (out == NULL)
        EXIT(1);
    BIO_set_fp(out, stdout, BIO_NOCLOSE);
    BIO_set_fp(out, stdout, BIO_NOCLOSE | BIO_FP_TEXT);

    if ((ctx = BN_CTX_new()) == NULL)
        goto err;
+1 −1
Changes for test/ecdsatest.c: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -510,7 +510,7 @@ int main(void)
    int ret = 1;
    BIO *out;

    out = BIO_new_fp(stdout, BIO_NOCLOSE);
    out = BIO_new_fp(stdout, BIO_NOCLOSE | BIO_FP_TEXT);

    /* enable memory leak checking unless explicitly disabled */
    if (!((getenv("OPENSSL_DEBUG_MEMORY") != NULL) &&
Loading