OPENSSL_config.pod 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. =pod
  2. =head1 NAME
  3. OPENSSL_config, OPENSSL_no_config - simple OpenSSL configuration functions
  4. =head1 SYNOPSIS
  5. #include <openssl/conf.h>
  6. void OPENSSL_config(const char *config_name);
  7. void OPENSSL_no_config(void);
  8. =head1 DESCRIPTION
  9. OPENSSL_config() configures OpenSSL using the standard B<openssl.cnf>
  10. configuration file name using B<config_name>. If B<config_name> is NULL then
  11. the default name B<openssl_conf> will be used. Any errors are ignored. Further
  12. calls to OPENSSL_config() will have no effect. The configuration file format
  13. is documented in the L<conf(5)|conf(5)> manual page.
  14. OPENSSL_no_config() disables configuration. If called before OPENSSL_config()
  15. no configuration takes place.
  16. =head1 NOTES
  17. It is B<strongly> recommended that B<all> new applications call OPENSSL_config()
  18. or the more sophisticated functions such as CONF_modules_load() during
  19. initialization (that is before starting any threads). By doing this
  20. an application does not need to keep track of all configuration options
  21. and some new functionality can be supported automatically.
  22. It is also possible to automatically call OPENSSL_config() when an application
  23. calls OPENSSL_add_all_algorithms() by compiling an application with the
  24. preprocessor symbol B<OPENSSL_LOAD_CONF> #define'd. In this way configuration
  25. can be added without source changes.
  26. The environment variable B<OPENSSL_CONF> can be set to specify the location
  27. of the configuration file.
  28. Currently ASN1 OBJECTs and ENGINE configuration can be performed future
  29. versions of OpenSSL will add new configuration options.
  30. There are several reasons why calling the OpenSSL configuration routines is
  31. advisable. For example new ENGINE functionality was added to OpenSSL 0.9.7.
  32. In OpenSSL 0.9.7 control functions can be supported by ENGINEs, this can be
  33. used (among other things) to load dynamic ENGINEs from shared libraries (DSOs).
  34. However very few applications currently support the control interface and so
  35. very few can load and use dynamic ENGINEs. Equally in future more sophisticated
  36. ENGINEs will require certain control operations to customize them. If an
  37. application calls OPENSSL_config() it doesn't need to know or care about
  38. ENGINE control operations because they can be performed by editing a
  39. configuration file.
  40. Applications should free up configuration at application closedown by calling
  41. CONF_modules_free().
  42. =head1 RESTRICTIONS
  43. The OPENSSL_config() function is designed to be a very simple "call it and
  44. forget it" function. As a result its behaviour is somewhat limited. It ignores
  45. all errors silently and it can only load from the standard configuration file
  46. location for example.
  47. It is however B<much> better than nothing. Applications which need finer
  48. control over their configuration functionality should use the configuration
  49. functions such as CONF_load_modules() directly.
  50. =head1 RETURN VALUES
  51. Neither OPENSSL_config() nor OPENSSL_no_config() return a value.
  52. =head1 SEE ALSO
  53. L<conf(5)|conf(5)>, L<CONF_load_modules_file(3)|CONF_load_modules_file(3)>,
  54. L<CONF_modules_free(3),CONF_modules_free(3)>
  55. =head1 HISTORY
  56. OPENSSL_config() and OPENSSL_no_config() first appeared in OpenSSL 0.9.7
  57. =cut