BIO_buffer_peek
if (BIO_buffer_peek(bp, peekbuf, sizeof(peekbuf)) <= 0)
if (BIO_buffer_peek(ctx->_.file.file, peekbuf, sizeof(peekbuf) - 1) > 0) {