DSA_set_method.pod 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. =pod
  2. =head1 NAME
  3. DSA_set_default_method, DSA_get_default_method,
  4. DSA_set_method, DSA_new_method, DSA_OpenSSL - select DSA method
  5. =head1 SYNOPSIS
  6. #include <openssl/dsa.h>
  7. The following functions have been deprecated since OpenSSL 3.0, and can be
  8. hidden entirely by defining B<OPENSSL_API_COMPAT> with a suitable version value,
  9. see L<openssl_user_macros(7)>:
  10. void DSA_set_default_method(const DSA_METHOD *meth);
  11. const DSA_METHOD *DSA_get_default_method(void);
  12. int DSA_set_method(DSA *dsa, const DSA_METHOD *meth);
  13. DSA *DSA_new_method(ENGINE *engine);
  14. const DSA_METHOD *DSA_OpenSSL(void);
  15. =head1 DESCRIPTION
  16. All of the functions described on this page are deprecated.
  17. Applications should providers instead of method overrides.
  18. A B<DSA_METHOD> specifies the functions that OpenSSL uses for DSA
  19. operations. By modifying the method, alternative implementations
  20. such as hardware accelerators may be used. IMPORTANT: See the NOTES section for
  21. important information about how these DSA API functions are affected by the use
  22. of B<ENGINE> API calls.
  23. Initially, the default DSA_METHOD is the OpenSSL internal implementation,
  24. as returned by DSA_OpenSSL().
  25. DSA_set_default_method() makes B<meth> the default method for all DSA
  26. structures created later.
  27. B<NB>: This is true only whilst no ENGINE has
  28. been set as a default for DSA, so this function is no longer recommended.
  29. This function is not thread-safe and should not be called at the same time
  30. as other OpenSSL functions.
  31. DSA_get_default_method() returns a pointer to the current default
  32. DSA_METHOD. However, the meaningfulness of this result is dependent on
  33. whether the ENGINE API is being used, so this function is no longer
  34. recommended.
  35. DSA_set_method() selects B<meth> to perform all operations using the key
  36. B<rsa>. This will replace the DSA_METHOD used by the DSA key and if the
  37. previous method was supplied by an ENGINE, the handle to that ENGINE will
  38. be released during the change. It is possible to have DSA keys that only
  39. work with certain DSA_METHOD implementations (e.g. from an ENGINE module
  40. that supports embedded hardware-protected keys), and in such cases
  41. attempting to change the DSA_METHOD for the key can have unexpected
  42. results. See L<DSA_meth_new(3)> for information on constructing custom DSA_METHOD
  43. objects;
  44. DSA_new_method() allocates and initializes a DSA structure so that B<engine>
  45. will be used for the DSA operations. If B<engine> is NULL, the default engine
  46. for DSA operations is used, and if no default ENGINE is set, the DSA_METHOD
  47. controlled by DSA_set_default_method() is used.
  48. =head1 RETURN VALUES
  49. DSA_OpenSSL() and DSA_get_default_method() return pointers to the respective
  50. B<DSA_METHOD>s.
  51. DSA_set_default_method() returns no value.
  52. DSA_set_method() returns nonzero if the provided B<meth> was successfully set as
  53. the method for B<dsa> (including unloading the ENGINE handle if the previous
  54. method was supplied by an ENGINE).
  55. DSA_new_method() returns NULL and sets an error code that can be
  56. obtained by L<ERR_get_error(3)> if the allocation
  57. fails. Otherwise it returns a pointer to the newly allocated structure.
  58. =head1 SEE ALSO
  59. L<DSA_new(3)>, L<DSA_new(3)>, L<DSA_meth_new(3)>
  60. =head1 HISTORY
  61. All of these functions were deprecated in OpenSSL 3.0.
  62. =head1 COPYRIGHT
  63. Copyright 2000-2021 The OpenSSL Project Authors. All Rights Reserved.
  64. Licensed under the Apache License 2.0 (the "License"). You may not use
  65. this file except in compliance with the License. You can obtain a copy
  66. in the file LICENSE in the source distribution or at
  67. L<https://www.openssl.org/source/license.html>.
  68. =cut