xref: /freebsd/crypto/openssl/apps/lib/apps_opt_printf.c (revision e7be843b4a162e68651d3911f0357ed464915629)
1*e7be843bSPierre Pronchery /*
2*e7be843bSPierre Pronchery  * Copyright 2022 The OpenSSL Project Authors. All Rights Reserved.
3*e7be843bSPierre Pronchery  *
4*e7be843bSPierre Pronchery  * Licensed under the Apache License 2.0 (the "License").  You may not use
5*e7be843bSPierre Pronchery  * this file except in compliance with the License.  You can obtain a copy
6*e7be843bSPierre Pronchery  * in the file LICENSE in the source distribution or at
7*e7be843bSPierre Pronchery  * https://www.openssl.org/source/license.html
8*e7be843bSPierre Pronchery  */
9*e7be843bSPierre Pronchery 
10*e7be843bSPierre Pronchery #include "opt.h"
11*e7be843bSPierre Pronchery #include <openssl/ui.h>
12*e7be843bSPierre Pronchery #include "apps_ui.h"
13*e7be843bSPierre Pronchery 
14*e7be843bSPierre Pronchery /* This function is defined here due to visibility of bio_err */
opt_printf_stderr(const char * fmt,...)15*e7be843bSPierre Pronchery int opt_printf_stderr(const char *fmt, ...)
16*e7be843bSPierre Pronchery {
17*e7be843bSPierre Pronchery     va_list ap;
18*e7be843bSPierre Pronchery     int ret;
19*e7be843bSPierre Pronchery 
20*e7be843bSPierre Pronchery     va_start(ap, fmt);
21*e7be843bSPierre Pronchery     ret = BIO_vprintf(bio_err, fmt, ap);
22*e7be843bSPierre Pronchery     va_end(ap);
23*e7be843bSPierre Pronchery     return ret;
24*e7be843bSPierre Pronchery }
25*e7be843bSPierre Pronchery 
26