2
0

OpenSSL_add_all_algorithms.pod 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. =pod
  2. =head1 NAME
  3. OpenSSL_add_all_algorithms, OpenSSL_add_all_ciphers, OpenSSL_add_all_digests, EVP_cleanup -
  4. add algorithms to internal table
  5. =head1 SYNOPSIS
  6. #include <openssl/evp.h>
  7. Deprecated:
  8. # if OPENSSL_API_COMPAT < 0x10100000L
  9. void OpenSSL_add_all_algorithms(void);
  10. void OpenSSL_add_all_ciphers(void);
  11. void OpenSSL_add_all_digests(void);
  12. void EVP_cleanup(void)
  13. # endif
  14. =head1 DESCRIPTION
  15. OpenSSL keeps an internal table of digest algorithms and ciphers. It uses
  16. this table to lookup ciphers via functions such as EVP_get_cipher_byname(). In
  17. OpenSSL versions prior to 1.1.0 these functions initialised and de-initialised
  18. this table. From OpenSSL 1.1.0 they are deprecated. No explicit initialisation
  19. or de-initialisation is required. See L<OPENSSL_init_crypto(3)> for further
  20. information.
  21. OpenSSL_add_all_digests() adds all digest algorithms to the table.
  22. OpenSSL_add_all_algorithms() adds all algorithms to the table (digests and
  23. ciphers).
  24. OpenSSL_add_all_ciphers() adds all encryption algorithms to the table including
  25. password based encryption algorithms.
  26. In versions prior to 1.1.0 EVP_cleanup() removed all ciphers and digests from
  27. the table. It no longer has any effect in OpenSSL 1.1.0.
  28. =head1 RETURN VALUES
  29. None of the functions return a value.
  30. =head1 NOTES
  31. A typical application will call OpenSSL_add_all_algorithms() initially and
  32. EVP_cleanup() before exiting.
  33. An application does not need to add algorithms to use them explicitly, for example
  34. by EVP_sha1(). It just needs to add them if it (or any of the functions it calls)
  35. needs to lookup algorithms.
  36. The cipher and digest lookup functions are used in many parts of the library. If
  37. the table is not initialized several functions will misbehave and complain they
  38. cannot find algorithms. This includes the PEM, PKCS#12, SSL and S/MIME libraries.
  39. This is a common query in the OpenSSL mailing lists.
  40. Calling OpenSSL_add_all_algorithms() links in all algorithms: as a result a
  41. statically linked executable can be quite large. If this is important it is possible
  42. to just add the required ciphers and digests.
  43. =head1 BUGS
  44. Although the functions do not return error codes it is possible for them to fail.
  45. This will only happen as a result of a memory allocation failure so this is not
  46. too much of a problem in practice.
  47. =head1 SEE ALSO
  48. L<evp(3)>, L<EVP_DigestInit(3)>,
  49. L<EVP_EncryptInit(3)>
  50. =head1 HISTORY
  51. The OpenSSL_add_all_algorithms(), OpenSSL_add_all_ciphers(),
  52. OpenSSL_add_all_digests(), and EVP_cleanup(), functions
  53. were deprecated in OpenSSL 1.1.0 by OPENSSL_init_crypto().
  54. =head1 COPYRIGHT
  55. Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.
  56. Licensed under the OpenSSL license (the "License"). You may not use
  57. this file except in compliance with the License. You can obtain a copy
  58. in the file LICENSE in the source distribution or at
  59. L<https://www.openssl.org/source/license.html>.
  60. =cut