decoder.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * Copyright 2020-2023 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. #ifndef OSSL_CRYPTO_DECODER_H
  10. # define OSSL_CRYPTO_DECODER_H
  11. # pragma once
  12. # include <openssl/decoder.h>
  13. /*
  14. * These are specially made for the 'file:' provider-native loader, which
  15. * uses this to install a DER to anything decoder, which doesn't do much
  16. * except read a DER blob and pass it on as a provider object abstraction
  17. * (provider-object(7)).
  18. */
  19. void *ossl_decoder_from_algorithm(int id, const OSSL_ALGORITHM *algodef,
  20. OSSL_PROVIDER *prov);
  21. OSSL_DECODER_INSTANCE *
  22. ossl_decoder_instance_new(OSSL_DECODER *decoder, void *decoderctx);
  23. void ossl_decoder_instance_free(OSSL_DECODER_INSTANCE *decoder_inst);
  24. OSSL_DECODER_INSTANCE *ossl_decoder_instance_dup(const OSSL_DECODER_INSTANCE *src);
  25. int ossl_decoder_ctx_add_decoder_inst(OSSL_DECODER_CTX *ctx,
  26. OSSL_DECODER_INSTANCE *di);
  27. int ossl_decoder_get_number(const OSSL_DECODER *encoder);
  28. int ossl_decoder_store_cache_flush(OSSL_LIB_CTX *libctx);
  29. int ossl_decoder_store_remove_all_provided(const OSSL_PROVIDER *prov);
  30. void *ossl_decoder_cache_new(OSSL_LIB_CTX *ctx);
  31. void ossl_decoder_cache_free(void *vcache);
  32. int ossl_decoder_cache_flush(OSSL_LIB_CTX *libctx);
  33. #endif