Debian Codegraph @

debian/rust-vendor/openssl-src/openssl/include/crypto/decoder.h

raw
1 /*
2 * Copyright 2020-2025 The OpenSSL Project Authors. All Rights Reserved.
3 *
4 * Licensed under the Apache License 2.0 (the "License"). You may not use
5 * this file except in compliance with the License. You can obtain a copy
6 * in the file LICENSE in the source distribution or at
7 * https://www.openssl.org/source/license.html
8 */
9
10 #ifndef OSSL_CRYPTO_DECODER_H
11 #define OSSL_CRYPTO_DECODER_H
12 #pragma once
13
14 #include <openssl/decoder.h>
15
16 /*
17 * These are specially made for the 'file:' provider-native loader, which
18 * uses this to install a DER to anything decoder, which doesn't do much
19 * except read a DER blob and pass it on as a provider object abstraction
20 * (provider-object(7)).
21 */
22 void *ossl_decoder_from_algorithm(int id, const OSSL_ALGORITHM *algodef,
23 OSSL_PROVIDER *prov);
24
25 OSSL_DECODER_INSTANCE *
26 ossl_decoder_instance_new_forprov(OSSL_DECODER *decoder, void *provctx,
27 const char *input_structure);
28 OSSL_DECODER_INSTANCE *
29 ossl_decoder_instance_new(OSSL_DECODER *decoder, void *decoderctx);
30 void ossl_decoder_instance_free(OSSL_DECODER_INSTANCE *decoder_inst);
31 int ossl_decoder_ctx_get_harderr(const OSSL_DECODER_CTX *ctx);
32 void ossl_decoder_ctx_set_harderr(OSSL_DECODER_CTX *ctx);
33 OSSL_DECODER_INSTANCE *ossl_decoder_instance_dup(const OSSL_DECODER_INSTANCE *src);
34 int ossl_decoder_ctx_add_decoder_inst(OSSL_DECODER_CTX *ctx,
35 OSSL_DECODER_INSTANCE *di);
36
37 int ossl_decoder_get_number(const OSSL_DECODER *encoder);
38 int ossl_decoder_store_cache_flush(OSSL_LIB_CTX *libctx);
39 int ossl_decoder_store_remove_all_provided(const OSSL_PROVIDER *prov);
40
41 void *ossl_decoder_cache_new(OSSL_LIB_CTX *ctx);
42 void ossl_decoder_cache_free(void *vcache);
43 int ossl_decoder_cache_flush(OSSL_LIB_CTX *libctx);
44
45 #endif