DSA_set_method.pod 3.1 KB

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