2020-08-02 18:46:00 +08:00
|
|
|
/*
|
2021-02-18 22:57:13 +08:00
|
|
|
* Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved.
|
2020-08-02 18:46:00 +08:00
|
|
|
*
|
|
|
|
* 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
|
|
|
|
* in the file LICENSE in the source distribution or at
|
|
|
|
* https://www.openssl.org/source/license.html
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef OSSL_CRYPTO_DECODER_H
|
|
|
|
# define OSSL_CRYPTO_DECODER_H
|
2021-02-07 05:36:46 +08:00
|
|
|
# pragma once
|
2020-08-02 18:46:00 +08:00
|
|
|
|
|
|
|
# include <openssl/decoder.h>
|
|
|
|
|
|
|
|
/*
|
|
|
|
* These are specially made for the 'file:' provider-native loader, which
|
|
|
|
* uses this to install a DER to anything decoder, which doesn't do much
|
|
|
|
* except read a DER blob and pass it on as a provider object abstraction
|
|
|
|
* (provider-object(7)).
|
|
|
|
*/
|
2021-03-16 21:14:43 +08:00
|
|
|
void *ossl_decoder_from_algorithm(int id, const OSSL_ALGORITHM *algodef,
|
|
|
|
OSSL_PROVIDER *prov);
|
2020-08-02 18:46:00 +08:00
|
|
|
|
|
|
|
OSSL_DECODER_INSTANCE *
|
|
|
|
ossl_decoder_instance_new(OSSL_DECODER *decoder, void *decoderctx);
|
|
|
|
void ossl_decoder_instance_free(OSSL_DECODER_INSTANCE *decoder_inst);
|
|
|
|
int ossl_decoder_ctx_add_decoder_inst(OSSL_DECODER_CTX *ctx,
|
|
|
|
OSSL_DECODER_INSTANCE *di);
|
|
|
|
|
2021-02-11 23:57:37 +08:00
|
|
|
int ossl_decoder_ctx_setup_for_pkey(OSSL_DECODER_CTX *ctx,
|
|
|
|
EVP_PKEY **pkey, const char *keytype,
|
|
|
|
OSSL_LIB_CTX *libctx,
|
|
|
|
const char *propquery);
|
2020-08-02 18:46:00 +08:00
|
|
|
|
2021-06-01 10:53:31 +08:00
|
|
|
int ossl_decoder_get_number(const OSSL_DECODER *encoder);
|
2022-05-04 15:15:29 +08:00
|
|
|
int ossl_decoder_store_cache_flush(OSSL_LIB_CTX *libctx);
|
|
|
|
int ossl_decoder_store_remove_all_provided(const OSSL_PROVIDER *prov);
|
2021-06-01 10:53:31 +08:00
|
|
|
|
2020-08-02 18:46:00 +08:00
|
|
|
#endif
|