int pop_sendcmd(POP_SESSION *psp, int cmd, ...) { va_list ap; struct pop_cmd *cmdp; #ifdef WITH_OPENSSL assert(psp != NULL && psp->bio != NULL); #else /* WITH_OPENSSL */ assert(psp != NULL && psp->fw != NULL); #endif /* WITH_OPENSSL */ cmdp = pop_getcmd(cmd); assert(cmdp != NULL && psp != NULL); va_start(ap, cmd); #ifdef WITH_OPENSSL BIO_vprintf(psp->bio, cmdp->fmt, ap); BIO_flush(psp->bio); #else /* WITH_OPENSSL */ vfprintf(psp->fw, cmdp->fmt, ap); fflush(psp->fw); #endif /* WITH_OPENSSL */ va_end(ap); return pop_recvresp(psp); }
static void capi_vtrace(CAPI_CTX *ctx, int level, char *format, va_list argptr) { BIO *out; if (!ctx || (ctx->debug_level < level) || (!ctx->debug_file)) return; out = BIO_new_file(ctx->debug_file, "a+"); BIO_vprintf(out, format, argptr); BIO_free(out); }
int BIO_printf(BIO *bio, const char *format, ...) { va_list args; int ret; va_start(args, format); ret = BIO_vprintf(bio, format, args); va_end(args); return (ret); }
static int indent_printf(int indent, BIO *bio, const char *format, ...) { va_list args; int ret; va_start(args, format); ret = BIO_printf(bio, "%*s", indent, "") + BIO_vprintf(bio, format, args); va_end(args); return ret; }
static void log_message(int level, const char *fmt, ...) { va_list ap; va_start(ap, fmt); # ifdef OCSP_DAEMON if (multi) { char buf[1024]; if (vsnprintf(buf, sizeof(buf), fmt, ap) > 0) { syslog(level, "%s", buf); } if (level >= LOG_ERR) ERR_print_errors_cb(print_syslog, &level); } # endif if (!multi) { BIO_printf(bio_err, "%s: ", prog); BIO_vprintf(bio_err, fmt, ap); BIO_printf(bio_err, "\n"); } va_end(ap); }