1*b077aed3SPierre Pronchery /* 2*b077aed3SPierre Pronchery * Copyright 2019-2021 The OpenSSL Project Authors. All Rights Reserved. 3*b077aed3SPierre Pronchery * 4*b077aed3SPierre Pronchery * Licensed under the Apache License 2.0 (the "License"). You may not use 5*b077aed3SPierre Pronchery * this file except in compliance with the License. You can obtain a copy 6*b077aed3SPierre Pronchery * in the file LICENSE in the source distribution or at 7*b077aed3SPierre Pronchery * https://www.openssl.org/source/license.html 8*b077aed3SPierre Pronchery */ 9*b077aed3SPierre Pronchery 10*b077aed3SPierre Pronchery #include <stdarg.h> 11*b077aed3SPierre Pronchery #include <openssl/bio.h> 12*b077aed3SPierre Pronchery #include <openssl/core.h> 13*b077aed3SPierre Pronchery #include "prov/provider_ctx.h" 14*b077aed3SPierre Pronchery 15*b077aed3SPierre Pronchery int ossl_prov_bio_from_dispatch(const OSSL_DISPATCH *fns); 16*b077aed3SPierre Pronchery 17*b077aed3SPierre Pronchery OSSL_CORE_BIO *ossl_prov_bio_new_file(const char *filename, const char *mode); 18*b077aed3SPierre Pronchery OSSL_CORE_BIO *ossl_prov_bio_new_membuf(const char *filename, int len); 19*b077aed3SPierre Pronchery int ossl_prov_bio_read_ex(OSSL_CORE_BIO *bio, void *data, size_t data_len, 20*b077aed3SPierre Pronchery size_t *bytes_read); 21*b077aed3SPierre Pronchery int ossl_prov_bio_write_ex(OSSL_CORE_BIO *bio, const void *data, size_t data_len, 22*b077aed3SPierre Pronchery size_t *written); 23*b077aed3SPierre Pronchery int ossl_prov_bio_gets(OSSL_CORE_BIO *bio, char *buf, int size); 24*b077aed3SPierre Pronchery int ossl_prov_bio_puts(OSSL_CORE_BIO *bio, const char *str); 25*b077aed3SPierre Pronchery int ossl_prov_bio_ctrl(OSSL_CORE_BIO *bio, int cmd, long num, void *ptr); 26*b077aed3SPierre Pronchery int ossl_prov_bio_up_ref(OSSL_CORE_BIO *bio); 27*b077aed3SPierre Pronchery int ossl_prov_bio_free(OSSL_CORE_BIO *bio); 28*b077aed3SPierre Pronchery int ossl_prov_bio_vprintf(OSSL_CORE_BIO *bio, const char *format, va_list ap); 29*b077aed3SPierre Pronchery int ossl_prov_bio_printf(OSSL_CORE_BIO *bio, const char *format, ...); 30*b077aed3SPierre Pronchery 31*b077aed3SPierre Pronchery BIO_METHOD *ossl_bio_prov_init_bio_method(void); 32*b077aed3SPierre Pronchery BIO *ossl_bio_new_from_core_bio(PROV_CTX *provctx, OSSL_CORE_BIO *corebio); 33