OpenSSL_add_all_algorithms.pod 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. void OpenSSL_add_all_algorithms(void);
  8. void OpenSSL_add_all_ciphers(void);
  9. void OpenSSL_add_all_digests(void);
  10. void EVP_cleanup(void);
  11. =head1 DESCRIPTION
  12. OpenSSL keeps an internal table of digest algorithms and ciphers. It uses
  13. this table to lookup ciphers via functions such as EVP_get_cipher_byname().
  14. OpenSSL_add_all_digests() adds all digest algorithms to the table.
  15. OpenSSL_add_all_algorithms() adds all algorithms to the table (digests and
  16. ciphers).
  17. OpenSSL_add_all_ciphers() adds all encryption algorithms to the table including
  18. password based encryption algorithms.
  19. EVP_cleanup() removes all ciphers and digests from the table.
  20. =head1 RETURN VALUES
  21. None of the functions return a value.
  22. =head1 NOTES
  23. A typical application will call OpenSSL_add_all_algorithms() initially and
  24. EVP_cleanup() before exiting.
  25. An application does not need to add algorithms to use them explicitly, for example
  26. by EVP_sha1(). It just needs to add them if it (or any of the functions it calls)
  27. needs to lookup algorithms.
  28. The cipher and digest lookup functions are used in many parts of the library. If
  29. the table is not initialized several functions will misbehave and complain they
  30. cannot find algorithms. This includes the PEM, PKCS#12, SSL and S/MIME libraries.
  31. This is a common query in the OpenSSL mailing lists.
  32. Calling OpenSSL_add_all_algorithms() links in all algorithms: as a result a
  33. statically linked executable can be quite large. If this is important it is possible
  34. to just add the required ciphers and digests.
  35. =head1 BUGS
  36. Although the functions do not return error codes it is possible for them to fail.
  37. This will only happen as a result of a memory allocation failure so this is not
  38. too much of a problem in practice.
  39. =head1 SEE ALSO
  40. L<evp(3)|evp(3)>, L<EVP_DigestInit(3)|EVP_DigestInit(3)>,
  41. L<EVP_EncryptInit(3)|EVP_EncryptInit(3)>
  42. =cut