EVP_SIGNATURE_free.pod 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. =pod
  2. =head1 NAME
  3. EVP_SIGNATURE_fetch, EVP_SIGNATURE_free, EVP_SIGNATURE_up_ref,
  4. EVP_SIGNATURE_number, EVP_SIGNATURE_is_a, EVP_SIGNATURE_provider,
  5. EVP_SIGNATURE_do_all_provided, EVP_SIGNATURE_names_do_all
  6. - Functions to manage EVP_SIGNATURE algorithm objects
  7. =head1 SYNOPSIS
  8. #include <openssl/evp.h>
  9. EVP_SIGNATURE *EVP_SIGNATURE_fetch(OPENSSL_CTX *ctx, const char *algorithm,
  10. const char *properties);
  11. void EVP_SIGNATURE_free(EVP_SIGNATURE *signature);
  12. int EVP_SIGNATURE_up_ref(EVP_SIGNATURE *signature);
  13. int EVP_SIGNATURE_number(const EVP_SIGNATURE *signature);
  14. int EVP_SIGNATURE_is_a(const EVP_SIGNATURE *signature, const char *name);
  15. OSSL_PROVIDER *EVP_SIGNATURE_provider(const EVP_SIGNATURE *signature);
  16. void EVP_SIGNATURE_do_all_provided(OPENSSL_CTX *libctx,
  17. void (*fn)(EVP_SIGNATURE *signature,
  18. void *arg),
  19. void *arg);
  20. void EVP_SIGNATURE_names_do_all(const EVP_SIGNATURE *signature,
  21. void (*fn)(const char *name, void *data),
  22. void *data);
  23. =head1 DESCRIPTION
  24. EVP_SIGNATURE_fetch() fetches the implementation for the given
  25. B<algorithm> from any provider offering it, within the criteria given
  26. by the B<properties>.
  27. The algorithm will be one offering functions for performing signature related
  28. tasks such as signing and verifying.
  29. See L<provider(7)/Fetching algorithms> for further information.
  30. The returned value must eventually be freed with EVP_SIGNATURE_free().
  31. EVP_SIGNATURE_free() decrements the reference count for the B<EVP_SIGNATURE>
  32. structure. Typically this structure will have been obtained from an earlier call
  33. to EVP_SIGNATURE_fetch(). If the reference count drops to 0 then the
  34. structure is freed.
  35. EVP_SIGNATURE_up_ref() increments the reference count for an B<EVP_SIGNATURE>
  36. structure.
  37. EVP_SIGNATURE_is_a() returns 1 if I<signature> is an implementation of an
  38. algorithm that's identifiable with I<name>, otherwise 0.
  39. EVP_SIGNATURE_provider() returns the provider that I<signature> was fetched from.
  40. EVP_SIGNATURE_do_all_provided() traverses all SIGNATURE implemented by all
  41. activated roviders in the given library context I<libctx>, and for each of the
  42. implementations, calls the given function I<fn> with the implementation method
  43. and the given I<arg> as argument.
  44. EVP_SIGNATURE_number() returns the internal dynamic number assigned to
  45. I<signature>.
  46. EVP_SIGNATURE_names_do_all() traverses all names for I<signature>, and calls
  47. I<fn> with each name and I<data>.
  48. =head1 RETURN VALUES
  49. EVP_SIGNATURE_fetch() returns a pointer to an B<EVP_SIGNATURE> for success
  50. or B<NULL> for failure.
  51. EVP_SIGNATURE_up_ref() returns 1 for success or 0 otherwise.
  52. =head1 SEE ALSO
  53. L<provider(7)/Fetching algorithms>, L<OSSL_PROVIDER(3)>
  54. =head1 HISTORY
  55. The functions described here were added in OpenSSL 3.0.
  56. =head1 COPYRIGHT
  57. Copyright 2019 The OpenSSL Project Authors. All Rights Reserved.
  58. Licensed under the Apache License 2.0 (the "License"). You may not use
  59. this file except in compliance with the License. You can obtain a copy
  60. in the file LICENSE in the source distribution or at
  61. L<https://www.openssl.org/source/license.html>.
  62. =cut