Latest update.
This commit is contained in:
@@ -10,13 +10,19 @@
|
||||
#include <stdarg.h>
|
||||
#include <openssl/bio.h>
|
||||
#include <openssl/core.h>
|
||||
#include "prov/provider_ctx.h"
|
||||
|
||||
int ossl_prov_bio_from_dispatch(const OSSL_DISPATCH *fns);
|
||||
|
||||
BIO *ossl_prov_bio_new_file(const char *filename, const char *mode);
|
||||
BIO *ossl_prov_bio_new_membuf(const char *filename, int len);
|
||||
int ossl_prov_bio_read_ex(BIO *bio, void *data, size_t data_len,
|
||||
OSSL_CORE_BIO *ossl_prov_bio_new_file(const char *filename, const char *mode);
|
||||
OSSL_CORE_BIO *ossl_prov_bio_new_membuf(const char *filename, int len);
|
||||
int ossl_prov_bio_read_ex(OSSL_CORE_BIO *bio, void *data, size_t data_len,
|
||||
size_t *bytes_read);
|
||||
int ossl_prov_bio_free(BIO *bio);
|
||||
int ossl_prov_bio_vprintf(BIO *bio, const char *format, va_list ap);
|
||||
int ossl_prov_bio_printf(BIO *bio, const char *format, ...);
|
||||
int ossl_prov_bio_write_ex(OSSL_CORE_BIO *bio, const void *data, size_t data_len,
|
||||
size_t *written);
|
||||
int ossl_prov_bio_free(OSSL_CORE_BIO *bio);
|
||||
int ossl_prov_bio_vprintf(OSSL_CORE_BIO *bio, const char *format, va_list ap);
|
||||
int ossl_prov_bio_printf(OSSL_CORE_BIO *bio, const char *format, ...);
|
||||
|
||||
BIO_METHOD *bio_prov_init_bio_method(void);
|
||||
BIO *bio_new_from_core_bio(PROV_CTX *provctx, OSSL_CORE_BIO *corebio);
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2019 The OpenSSL Project Authors. All Rights Reserved.
|
||||
* Copyright 2019-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
||||
* this file except in compliance with the License. You can obtain a copy
|
||||
@@ -7,8 +7,34 @@
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
#ifndef OSSL_PROV_PROVIDER_CTX_H
|
||||
# define OSSL_PROV_PROVIDER_CTX_H
|
||||
|
||||
# include <openssl/types.h>
|
||||
# include <openssl/crypto.h>
|
||||
# include <openssl/bio.h>
|
||||
# include <openssl/core.h>
|
||||
|
||||
typedef struct prov_ctx_st {
|
||||
const OSSL_CORE_HANDLE *handle;
|
||||
OPENSSL_CTX *libctx; /* For all provider modules */
|
||||
BIO_METHOD *corebiometh;
|
||||
} PROV_CTX;
|
||||
|
||||
/*
|
||||
* To be used anywhere the library context needs to be passed, such as to
|
||||
* fetching functions.
|
||||
*/
|
||||
#define PROV_LIBRARY_CONTEXT_OF(provctx) (provctx)
|
||||
# define PROV_LIBRARY_CONTEXT_OF(provctx) \
|
||||
PROV_CTX_get0_library_context((provctx))
|
||||
|
||||
PROV_CTX *PROV_CTX_new(void);
|
||||
void PROV_CTX_free(PROV_CTX *ctx);
|
||||
void PROV_CTX_set0_library_context(PROV_CTX *ctx, OPENSSL_CTX *libctx);
|
||||
void PROV_CTX_set0_handle(PROV_CTX *ctx, const OSSL_CORE_HANDLE *handle);
|
||||
void PROV_CTX_set0_core_bio_method(PROV_CTX *ctx, BIO_METHOD *corebiometh);
|
||||
OPENSSL_CTX *PROV_CTX_get0_library_context(PROV_CTX *ctx);
|
||||
const OSSL_CORE_HANDLE *PROV_CTX_get0_handle(PROV_CTX *ctx);
|
||||
BIO_METHOD *PROV_CTX_get0_core_bio_method(PROV_CTX *ctx);
|
||||
|
||||
#endif
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
#include <openssl/provider.h>
|
||||
|
||||
const OSSL_PROVIDER *FIPS_get_provider(OPENSSL_CTX *ctx);
|
||||
const OSSL_CORE_HANDLE *FIPS_get_core_handle(OPENSSL_CTX *ctx);
|
||||
|
||||
const char *ossl_prov_util_nid_to_name(int nid);
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
|
||||
#ifndef OPENSSL_PROVERR_H
|
||||
# define OPENSSL_PROVERR_H
|
||||
# pragma once
|
||||
|
||||
# include <openssl/opensslconf.h>
|
||||
# include <openssl/symhacks.h>
|
||||
@@ -89,6 +90,7 @@ int ERR_load_PROV_strings(void);
|
||||
# define PROV_R_INVALID_PSS_SALTLEN 169
|
||||
# define PROV_R_INVALID_SALT_LENGTH 112
|
||||
# define PROV_R_INVALID_SEED_LENGTH 154
|
||||
# define PROV_R_INVALID_SIGNATURE_SIZE 179
|
||||
# define PROV_R_INVALID_TAG 110
|
||||
# define PROV_R_INVALID_TAGLEN 118
|
||||
# define PROV_R_INVALID_X931_DIGEST 170
|
||||
@@ -110,6 +112,7 @@ int ERR_load_PROV_strings(void);
|
||||
# define PROV_R_NOT_XOF_OR_INVALID_LENGTH 113
|
||||
# define PROV_R_NO_KEY_SET 114
|
||||
# define PROV_R_NO_PARAMETERS_SET 177
|
||||
# define PROV_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE 178
|
||||
# define PROV_R_OUTPUT_BUFFER_TOO_SMALL 106
|
||||
# define PROV_R_PSS_SALTLEN_TOO_SMALL 172
|
||||
# define PROV_R_READ_KEY 159
|
||||
|
||||
Reference in New Issue
Block a user