Commit Graph

353 Commits

Author SHA1 Message Date
Trustin Lee
ac17fa081b Require Maven 3.1.1 or above
.. because the build fails with an older Maven version due to Eclipse
Aether issues
2014-06-04 03:16:34 +09:00
Trustin Lee
18264346f6 Upgrade to netty-tcnative 1.1.30.Fork2 to support Windows 2014-05-28 10:55:03 +09:00
Trustin Lee
f97e81c305 Upgrade os-maven-plugin to fix an issue with IntelliJ IDEA on Windows 2014-05-27 04:40:58 +09:00
Trustin Lee
9ab8898db1 Use a forked exec-maven-plugin instead of maven-antrun-plugin
Motivation:

maven-antrun-plugin does not redirect stdin, and thus it's impossible to
run interactive examples such as securechat-client and telnet-client.
org.codehaus.mojo:exec-maven-plugin redirects stdin, but it buffers
stdout and stderr, and thus an application output is not flushed timely.

Modifications:

Deploy a forked version of exec-maven-plugin which flushes output
buffers in a timely manner.

Result:

Interactive examples work.  Launches faster than maven-antrun-plugin.
2014-05-23 20:09:15 +09:00
Trustin Lee
500ba1c724 Hide unwanted debug logs and warnings from Maven plugins 2014-05-22 18:31:43 +09:00
Trustin Lee
5c7581ed9f Use maven-antrun-plugin instead of exec-maven-plugin
Motivation:

exec-maven-plugin does not flush stdout and stderr, making the console
output from the examples invisible to users

Modification:

Use maven-antrun-plugin instead

Result:

A user sees the output from the examples immediately.
2014-05-22 18:24:52 +09:00
Trustin Lee
ba28679775 Clean up the examples
Motivation:

The examples have not been updated since long time ago, showing various
issues fixed in this commit.

Modifications:

- Overall simplification to reduce LoC
  - Use system properties to get options instead of parsing args.
  - Minimize option validation
  - Just use System.out/err instead of Logger
  - Do not pass config as parameters - just access it directly
  - Move the main logic to main(String[]) instead of creating a new
    instance meaninglessly
    - Update netty-build-21 to make checkstyle not complain
  - Remove 'throws Exception' clause if possible
- Line wrap at 120 (previously at 80)
- Add an option to enable SSL for most examples
- Use ChannelFuture.sync() instead of await()
- Use System.out for the actual result. Use System.err otherwise.
- Delete examples that are not very useful:
  - websocket/html5
  - websocketx/sslserver
  - localecho/multithreaded
- Add run-example.sh which simplifies launching an example from command
  line

Result:

Shorter and simpler examples.  A user can focus more on what it actually
does than miscellaneous stuff.  A user can launch an example very
easily.
2014-05-22 17:52:23 +09:00
Trustin Lee
8672603a1d Add unified NextProtoNego extension support to SslContext
Motivation:

- OpenSslEngine and JDK SSLEngine (+ Jetty NPN) have different APIs to
  support NextProtoNego extension.
  - It is impossible to configure NPN with SslContext when the provider
    type is JDK.

Modification:

- Implement NextProtoNego extension by overriding the behavior of
  SSLSession.getProtocol() for both OpenSSLEngine and JDK SSLEngine.
  - SSLEngine.getProtocol() returns a string delimited by a colon (':')
    where the first component is the transport protosol (e.g. TLSv1.2)
    and the second component is the name of the application protocol
- Remove the direct reference of Jetty NPN classes from the examples
- Add SslContext.newApplicationProtocolSelector

Result:

- A user can now use both JDK SSLEngine and OpenSslEngine for NPN-based
  protocols such as HTTP2 and SPDY
2014-05-21 17:38:52 +09:00
Trustin Lee
1295c22469 Update os-maven-plugin again to address an IDEA integration issue 2014-05-19 01:31:46 +09:00
Trustin Lee
30a2956398 Upgrade os-maven-plugin to the latest version 2014-05-18 17:31:55 +09:00
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
Trustin Lee
4cff4b99fd Add OpenSslEngine
Motivation:

Some users already use an SSLEngine implementation in finagle-native. It
wraps OpenSSL to get higher SSL performance.  However, to take advantage
of it, finagle-native must be compiled manually, and it means we cannot
pull it in as a dependency and thus we cannot test our SslHandler
against the OpenSSL-based SSLEngine.  For an instance, we had #2216.

Modifications:

- Pull netty-tcnative in as an optional dependency.
  http://netty.io/wiki/forked-tomcat-native.html
- Backport NativeLibraryLoader from 4.0
- Move OpenSSL-based SSLEngine implementation into our code base.
  - Copied from finagle-native; originally written by @jpinner et al.
  - Overall cleanup by @trustin.
- Run all SslHandler tests with both default SSLEngine and OpenSslEngine
2014-05-13 19:04:54 +09:00
Trustin Lee
b954f6e85d Upgrade netty-build to 20
- Preparation for merging openssl branch
- Also upgrade oss-parent to the latest version
2014-05-07 22:47:56 +09:00
Norman Maurer
00bf5eb898 [maven-release-plugin] prepare for next development iteration 2014-04-30 15:46:20 +02:00
Norman Maurer
1e4fa0565a [maven-release-plugin] prepare release netty-3.9.1.Final 2014-04-30 15:46:14 +02:00
Trustin Lee
fc9a794613 [maven-release-plugin] prepare for next development iteration 2013-12-22 19:45:29 +09:00
Trustin Lee
a06d4dddd5 [maven-release-plugin] prepare release netty-3.9.0.Final 2013-12-22 19:45:19 +09:00
Trustin Lee
1fc171b58d [maven-release-plugin] prepare for next development iteration 2013-11-07 18:18:42 +09:00
Trustin Lee
6e67ddeed7 [maven-release-plugin] prepare release netty-3.8.0.Final 2013-11-07 18:18:34 +09:00
Trustin Lee
cc9c7d1607 Bump the version number to 3.8.0.Final 2013-10-17 20:31:19 +09:00
Trustin Lee
df97732483 [maven-release-plugin] prepare for next development iteration 2013-09-05 23:14:49 +09:00
Trustin Lee
5b2cb54bb6 [maven-release-plugin] prepare release netty-3.7.0.Final 2013-09-05 23:14:39 +09:00
Trustin Lee
e0aabbddf2 Next version will be 3.7.0.Final 2013-06-25 11:08:33 +09:00
Norman Maurer
7364317a01 [maven-release-plugin] prepare for next development iteration 2013-05-15 08:04:54 +02:00
Norman Maurer
90e1eb23ea [maven-release-plugin] prepare release netty-3.6.6.Final 2013-05-15 08:04:43 +02:00
Norman Maurer
524007efe0 [maven-release-plugin] prepare for next development iteration 2013-04-09 10:18:55 +02:00
Norman Maurer
1ad09202c9 [maven-release-plugin] prepare release netty-3.6.5.Final 2013-04-09 10:18:47 +02:00
Trustin Lee
08ec96e4f4 [maven-release-plugin] prepare for next development iteration 2013-04-05 09:21:17 +09:00
Trustin Lee
06418640a1 [maven-release-plugin] prepare release netty-3.6.4.Final 2013-04-05 09:21:05 +09:00
Prajwal Tuladhar
9d2ceb82c6 upgrade to maven 3.0.5
As Netty is using its own CI now
2013-03-28 22:04:33 +01:00
hepin1989
f7f6e69bb6 add support for protobuf 2.5.0 2013-03-13 16:43:36 +09:00
Trustin Lee
ec012c0f81 Require Maven 3.0.4 2013-03-11 09:41:13 +09:00
Trustin Lee
b796e5d919 Require Maven 3.0.5 which fixes security issues in the previous versions 2013-02-23 21:11:40 -08:00
Norman Maurer
6ed2a5d82d [maven-release-plugin] prepare for next development iteration 2013-02-21 14:31:08 +01:00
Norman Maurer
d70e3c1561 [maven-release-plugin] prepare release netty-3.6.3.Final 2013-02-21 14:30:57 +01:00
Trustin Lee
bea8851a58 Upgrade to netty-build-16 2013-02-06 00:01:16 +09:00
Norman Maurer
627686bdb4 [maven-release-plugin] prepare for next development iteration 2013-01-16 12:28:52 +01:00
Norman Maurer
c0d783c76f [maven-release-plugin] prepare release netty-3.6.2.Final 2013-01-16 12:28:42 +01:00
Norman Maurer
fc5606e034 Make compatible with java5 2013-01-15 09:24:21 +01:00
alexey
9fcd31a4f4 backport socks codec to 3 branch 2013-01-15 09:16:08 +01:00
Norman Maurer
b38114154d [maven-release-plugin] prepare for next development iteration 2013-01-03 15:16:10 +01:00
Norman Maurer
af307c4ad7 [maven-release-plugin] prepare release netty-3.6.1.Final 2013-01-03 15:15:59 +01:00
Norman Maurer
7269dff87f [maven-release-plugin] prepare for next development iteration 2012-12-20 07:08:30 +01:00
Norman Maurer
06b3c8afd1 [maven-release-plugin] prepare release netty-3.6.0.Final 2012-12-20 07:08:22 +01:00
Trustin Lee
d4a7722cfd Update netty-build to the latest version
From this commit, checkstyle considers an unnecessary empty line as a
violation.
2012-12-04 16:48:27 +09:00
Trustin Lee
7f1b38262c Remove unnecessary empty lines 2012-12-03 20:51:25 +09:00
Trustin Lee
7a7668b101 Upgrade netty-build to 12 2012-11-14 16:32:07 +09:00
Trustin Lee
8e0437e3e6 Suppress false-positive inspection warnings / 2012-11-12 09:05:16 +09:00
Norman Maurer
0c39f9c4cf [maven-release-plugin] prepare for next development iteration 2012-11-11 19:00:55 +01:00
Norman Maurer
1198e18133 [maven-release-plugin] prepare release netty-3.6.0.Beta1 2012-11-11 19:00:48 +01:00