SSL_COMP_add_compression_method.pod 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. =pod
  2. =head1 NAME
  3. SSL_COMP_add_compression_method, SSL_COMP_free_compression_methods - handle SSL/TLS integrated compression methods
  4. =head1 SYNOPSIS
  5. #include <openssl/ssl.h>
  6. int SSL_COMP_add_compression_method(int id, COMP_METHOD *cm);
  7. +void SSL_COMP_free_compression_methods(void);
  8. =head1 DESCRIPTION
  9. SSL_COMP_add_compression_method() adds the compression method B<cm> with
  10. the identifier B<id> to the list of available compression methods. This
  11. list is globally maintained for all SSL operations within this application.
  12. It cannot be set for specific SSL_CTX or SSL objects.
  13. SSL_COMP_free_compression_methods() frees the internal table of
  14. compression methods that were built internally, and possibly
  15. augmented by adding SSL_COMP_add_compression_method().
  16. =head1 NOTES
  17. The TLS standard (or SSLv3) allows the integration of compression methods
  18. into the communication. The TLS RFC does however not specify compression
  19. methods or their corresponding identifiers, so there is currently no compatible
  20. way to integrate compression with unknown peers. It is therefore currently not
  21. recommended to integrate compression into applications. Applications for
  22. non-public use may agree on certain compression methods. Using different
  23. compression methods with the same identifier will lead to connection failure.
  24. An OpenSSL client speaking a protocol that allows compression (SSLv3, TLSv1)
  25. will unconditionally send the list of all compression methods enabled with
  26. SSL_COMP_add_compression_method() to the server during the handshake.
  27. Unlike the mechanisms to set a cipher list, there is no method available to
  28. restrict the list of compression method on a per connection basis.
  29. An OpenSSL server will match the identifiers listed by a client against
  30. its own compression methods and will unconditionally activate compression
  31. when a matching identifier is found. There is no way to restrict the list
  32. of compression methods supported on a per connection basis.
  33. If enabled during compilation, the OpenSSL library will have the
  34. COMP_zlib() compression method available.
  35. =head1 WARNINGS
  36. Once the identities of the compression methods for the TLS protocol have
  37. been standardized, the compression API will most likely be changed. Using
  38. it in the current state is not recommended.
  39. =head1 RETURN VALUES
  40. SSL_COMP_add_compression_method() may return the following values:
  41. =over 4
  42. =item Z<>0
  43. The operation succeeded.
  44. =item Z<>1
  45. The operation failed. Check the error queue to find out the reason.
  46. =back
  47. =head1 SEE ALSO
  48. L<ssl(3)|ssl(3)>
  49. =cut