netty5/license
Trustin Lee cb4020d4be Provide convenient universal API to enable SSL/TLS
Motivation:

Although 4cff4b99fd introduced
OpenSslEngine and its helper classes, a user has to write two different
copies of SSL initialization code that does pretty much same job,
because the initialization procedure between JDK SSLEngine and
OpenSslEngine are different.

Modifications:

- Replace OpenSslContextBuilder with SslContext which provides the
  unified API for creating an SSL context
  - SslContext allows you to create a new SSLEngine or a new SslHandler
    with your PKCS#8 key and X.509 certificate chain.
- Merge OpenSslBufferPool into SslBufferPool
  - Add an option to preallocate the pool
  - Add an option to allocate direct buffers
  - When OpenSSL is in use, preallocate direct buffers, which is close
    to what OpenSslBufferPool does.
- Add JdkSslContext which is a simple wrapper of JDK's SSLContext
  - The specified PKCS#8 key and X.509 certificate chain are converted
    to JDK KeyStore in instantiation time.
  - Like OpenSslServerContext, it uses sensible default cipher suites now.
- A user does not specify certPath and caPath separately anymore. He or
  she has to merge them into a single file.  I find this more logical
  because previously ca file's first entry and cert file were always same.
- Clean up SSL tests to demonstrate the advantage of this change
  - AbstractSocketSsl*Test now uses SslContext.new*Context() to
    configure both the client and the server side.  We did this only for
    the server side previously and had to use different certificates for
    JDK SSLEngine and OpenSslEngine, but not anymore.
- Add ApplicationProtocolSelector to ensure the future support for NPN
  (NextProtoNego) and ALPN (Application Layer Protocol Negotiation) on
  the client-side.
- Add SimpleTrustManagerFactory to help a user write a
  TrustManagerFactory easily, which should be useful for those who need
  to write an alternative verification mechanism. For example, we can
  use it to implement an unsafe TrustManagerFactory that accepts
  self-signed certificates for testing purposes.
- Add InsecureTrustManagerFactory and FingerprintTrustManager for quick
  and dirty testing
- Add SelfSignedCertificate class which generates a self-signed X.509
  certificate very easily.
- Update all our examples to use SslContext.newClient/ServerContext()
- Found that OpenSslEngine performs unnecessary memory copy - optimized
  it.
- SslHandler now logs the chosen cipher suite when handshake is
  finished.

Result:

- Cleaner unified API for configuring an SSL client and an SSL server
  regardless of its internal implementation.
- When native libraries are available, OpenSSL-based SSLEngine
  implementation is selected automatically to take advantage of its
  performance benefit.
- Examples take advantage of this modification and thus are cleaner.
2014-05-17 19:40:48 +09:00
..
LICENSE.base64.txt * Moved all third party license filed into the 'license' directory 2008-12-30 02:41:09 +00:00
LICENSE.bouncycastle.txt Provide convenient universal API to enable SSL/TLS 2014-05-17 19:40:48 +09:00
LICENSE.commons-logging.txt * Moved all third party license filed into the 'license' directory 2008-12-30 02:41:09 +00:00
LICENSE.felix.txt Updated license information (NETTY-106 Add missing license files to the distribution) 2009-02-13 13:58:37 +00:00
LICENSE.jboss-logging.txt * Moved all third party license filed into the 'license' directory 2008-12-30 02:41:09 +00:00
LICENSE.jsr166y.txt * Moved all third party license filed into the 'license' directory 2008-12-30 02:41:09 +00:00
LICENSE.jzlib.txt Relates issue: NETTY-80 Compression codec 2009-10-16 06:10:25 +00:00
LICENSE.log4j.txt * Moved all third party license filed into the 'license' directory 2008-12-30 02:41:09 +00:00
LICENSE.protobuf.txt * Moved all third party license filed into the 'license' directory 2008-12-30 02:41:09 +00:00
LICENSE.slf4j.txt * Moved all third party license filed into the 'license' directory 2008-12-30 02:41:09 +00:00
LICENSE.webbit.txt Update notices for WebSocket support. 2011-12-09 16:15:41 +11:00