decoder.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * Copyright 2020 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. # include <openssl/decoder.h>
  12. OSSL_DECODER *ossl_decoder_fetch_by_number(OSSL_LIB_CTX *libctx,
  13. int id,
  14. const char *properties);
  15. /*
  16. * These are specially made for the 'file:' provider-native loader, which
  17. * uses this to install a DER to anything decoder, which doesn't do much
  18. * except read a DER blob and pass it on as a provider object abstraction
  19. * (provider-object(7)).
  20. */
  21. void *ossl_decoder_from_dispatch(int id, const OSSL_ALGORITHM *algodef,
  22. OSSL_PROVIDER *prov);
  23. OSSL_DECODER_INSTANCE *
  24. ossl_decoder_instance_new(OSSL_DECODER *decoder, void *decoderctx);
  25. void ossl_decoder_instance_free(OSSL_DECODER_INSTANCE *decoder_inst);
  26. int ossl_decoder_ctx_add_decoder_inst(OSSL_DECODER_CTX *ctx,
  27. OSSL_DECODER_INSTANCE *di);
  28. int ossl_decoder_ctx_setup_for_EVP_PKEY(OSSL_DECODER_CTX *ctx,
  29. EVP_PKEY **pkey, const char *keytype,
  30. OSSL_LIB_CTX *libctx,
  31. const char *propquery);
  32. #endif