get standard FILE stream- out and err for openssl bio_out and bio_err (#22)

Reviewed-on: http://13.234.246.121:3000/Neominds/ossl35vx69/pulls/22
Co-authored-by: siddhant <siddhant.singh@neominds.in>
Co-committed-by: siddhant <siddhant.singh@neominds.in>
This commit is contained in:
2026-07-30 19:34:51 +05:30
committed by neelimap
parent 93a2e9503f
commit 9198426edf
@@ -839,12 +839,26 @@ int ipcrypto_init_internal(SEM_ID semId)
}
#if defined (_WRS_KERNEL)
/* use shareable FILEs rather than task-specific stdout/stderr */
bio_out = BIO_new_fp(stdout, BIO_NOCLOSE | BIO_FP_TEXT);
bio_err = BIO_new_fp(stderr, BIO_NOCLOSE | BIO_FP_TEXT);
/* use shareable FILEs rather than task-specific stdout/stderr */
int fdout, fderr;
FILE *fpout = NULL, *fperr = NULL;
fdout = ioGlobalStdGet(STD_OUT);
fderr = ioGlobalStdGet(STD_ERR);
fpout = fdopen(fdout, "w");
fperr = fdopen(fderr, "w");
if (!fpout || !fderr)
{
printf ("Failed to open file for stdout and stderr\n");
return -1;
}
bio_out = BIO_new_fp(fpout, BIO_NOCLOSE | BIO_FP_TEXT);
bio_err = BIO_new_fp(fperr, BIO_NOCLOSE | BIO_FP_TEXT);
#else
bio_out = BIO_new_fp(stdout, BIO_NOCLOSE | BIO_FP_TEXT);
bio_err = BIO_new_fp(stderr, BIO_NOCLOSE | BIO_FP_TEXT);
bio_out = BIO_new_fp(stdout, BIO_NOCLOSE | BIO_FP_TEXT);
bio_err = BIO_new_fp(stderr, BIO_NOCLOSE | BIO_FP_TEXT);
#endif /* _WRS_KERNEL */
/*