decoder.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * Copyright 2020-2021 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. OSSL_DECODER *ossl_decoder_fetch_by_number(OSSL_LIB_CTX *libctx,
  14. int id,
  15. const char *properties);
  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. OSSL_DECODER_INSTANCE *
  25. ossl_decoder_instance_new(OSSL_DECODER *decoder, void *decoderctx);
  26. void ossl_decoder_instance_free(OSSL_DECODER_INSTANCE *decoder_inst);
  27. int ossl_decoder_ctx_add_decoder_inst(OSSL_DECODER_CTX *ctx,
  28. OSSL_DECODER_INSTANCE *di);
  29. int ossl_decoder_ctx_setup_for_pkey(OSSL_DECODER_CTX *ctx,
  30. EVP_PKEY **pkey, const char *keytype,
  31. OSSL_LIB_CTX *libctx,
  32. const char *propquery);
  33. int ossl_decoder_get_number(const OSSL_DECODER *encoder);
  34. #endif