From 19a737fbff45e34a2ce944dd720a36e4314d62b8 Mon Sep 17 00:00:00 2001 From: Henry Story Date: Mon, 28 May 2012 16:14:51 +0200 Subject: [PATCH 1/3] TLS in dev mode & FakeKeyStore cert CN=localhost --- .../scala/play/core/server/NettyServer.scala | 4 +- .../play/core/server/netty/FakeKeyStore.java | 400 +++++++----------- 2 files changed, 145 insertions(+), 259 deletions(-) diff --git a/framework/src/play/src/main/scala/play/core/server/NettyServer.scala b/framework/src/play/src/main/scala/play/core/server/NettyServer.scala index 478acd88843..55d4877599c 100644 --- a/framework/src/play/src/main/scala/play/core/server/NettyServer.scala +++ b/framework/src/play/src/main/scala/play/core/server/NettyServer.scala @@ -214,7 +214,9 @@ object NettyServer { play.utils.Threads.withContextClassLoader(this.getClass.getClassLoader) { try { val appProvider = new ReloadableApplication(sbtLink) - new NettyServer(appProvider, port, mode = Mode.Dev) + new NettyServer(appProvider, port, + Option(System.getProperty("https.port")).map(Integer.parseInt(_)), + mode = Mode.Dev) } catch { case e => { throw e match { diff --git a/framework/src/play/src/main/scala/play/core/server/netty/FakeKeyStore.java b/framework/src/play/src/main/scala/play/core/server/netty/FakeKeyStore.java index 9ba2b9f707c..c4827bc3e88 100644 --- a/framework/src/play/src/main/scala/play/core/server/netty/FakeKeyStore.java +++ b/framework/src/play/src/main/scala/play/core/server/netty/FakeKeyStore.java @@ -5,264 +5,148 @@ public class FakeKeyStore { private static final short[] DATA = new short[] { - 0xfe, 0xed, 0xfe, 0xed, 0x00, 0x00, 0x00, 0x02, - 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, - 0x00, 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, - 0x65, 0x00, 0x00, 0x01, 0x1a, 0x9f, 0x57, 0xa5, - 0x27, 0x00, 0x00, 0x01, 0x9a, 0x30, 0x82, 0x01, - 0x96, 0x30, 0x0e, 0x06, 0x0a, 0x2b, 0x06, 0x01, - 0x04, 0x01, 0x2a, 0x02, 0x11, 0x01, 0x01, 0x05, - 0x00, 0x04, 0x82, 0x01, 0x82, 0x48, 0x6d, 0xcf, - 0x16, 0xb5, 0x50, 0x95, 0x36, 0xbf, 0x47, 0x27, - 0x50, 0x58, 0x0d, 0xa2, 0x52, 0x7e, 0x25, 0xab, - 0x14, 0x1a, 0x26, 0x5e, 0x2d, 0x8a, 0x23, 0x90, - 0x60, 0x7f, 0x12, 0x20, 0x56, 0xd1, 0x43, 0xa2, - 0x6b, 0x47, 0x5d, 0xed, 0x9d, 0xd4, 0xe5, 0x83, - 0x28, 0x89, 0xc2, 0x16, 0x4c, 0x76, 0x06, 0xad, - 0x8e, 0x8c, 0x29, 0x1a, 0x9b, 0x0f, 0xdd, 0x60, - 0x4b, 0xb4, 0x62, 0x82, 0x9e, 0x4a, 0x63, 0x83, - 0x2e, 0xd2, 0x43, 0x78, 0xc2, 0x32, 0x1f, 0x60, - 0xa9, 0x8a, 0x7f, 0x0f, 0x7c, 0xa6, 0x1d, 0xe6, - 0x92, 0x9e, 0x52, 0xc7, 0x7d, 0xbb, 0x35, 0x3b, - 0xaa, 0x89, 0x73, 0x4c, 0xfb, 0x99, 0x54, 0x97, - 0x99, 0x28, 0x6e, 0x66, 0x5b, 0xf7, 0x9b, 0x7e, - 0x6d, 0x8a, 0x2f, 0xfa, 0xc3, 0x1e, 0x71, 0xb9, - 0xbd, 0x8f, 0xc5, 0x63, 0x25, 0x31, 0x20, 0x02, - 0xff, 0x02, 0xf0, 0xc9, 0x2c, 0xdd, 0x3a, 0x10, - 0x30, 0xab, 0xe5, 0xad, 0x3d, 0x1a, 0x82, 0x77, - 0x46, 0xed, 0x03, 0x38, 0xa4, 0x73, 0x6d, 0x36, - 0x36, 0x33, 0x70, 0xb2, 0x63, 0x20, 0xca, 0x03, - 0xbf, 0x5a, 0xf4, 0x7c, 0x35, 0xf0, 0x63, 0x1a, - 0x12, 0x33, 0x12, 0x58, 0xd9, 0xa2, 0x63, 0x6b, - 0x63, 0x82, 0x41, 0x65, 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 0x23, 0x18, 0xed, 0xc1, 0xef, 0xe2, 0x4b, 0xec, - 0xc9, 0xba, 0xfb, 0x46, 0x43, 0x90, 0xd7, 0xb5, - 0x68, 0x28, 0x31, 0x2b, 0x8d, 0xa8, 0x51, 0x63, - 0xf7, 0x53, 0x99, 0x19, 0x68, 0x85, 0x66, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x05, 0x58, 0x2e, 0x35, - 0x30, 0x39, 0x00, 0x00, 0x02, 0x3a, 0x30, 0x82, - 0x02, 0x36, 0x30, 0x82, 0x01, 0xe0, 0xa0, 0x03, - 0x02, 0x01, 0x02, 0x02, 0x04, 0x48, 0x59, 0xf1, - 0x92, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, - 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x05, 0x05, 0x00, - 0x30, 0x81, 0xa0, 0x31, 0x0b, 0x30, 0x09, 0x06, - 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x4b, 0x52, - 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, - 0x08, 0x13, 0x0a, 0x4b, 0x79, 0x75, 0x6e, 0x67, - 0x67, 0x69, 0x2d, 0x64, 0x6f, 0x31, 0x14, 0x30, - 0x12, 0x06, 0x03, 0x55, 0x04, 0x07, 0x13, 0x0b, - 0x53, 0x65, 0x6f, 0x6e, 0x67, 0x6e, 0x61, 0x6d, - 0x2d, 0x73, 0x69, 0x31, 0x1a, 0x30, 0x18, 0x06, - 0x03, 0x55, 0x04, 0x0a, 0x13, 0x11, 0x54, 0x68, - 0x65, 0x20, 0x4e, 0x65, 0x74, 0x74, 0x79, 0x20, - 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x31, - 0x18, 0x30, 0x16, 0x06, 0x03, 0x55, 0x04, 0x0b, - 0x13, 0x0f, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, - 0x65, 0x20, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x73, 0x31, 0x30, 0x30, 0x2e, 0x06, 0x03, 0x55, - 0x04, 0x03, 0x13, 0x27, 0x73, 0x65, 0x63, 0x75, - 0x72, 0x65, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x65, - 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x6e, - 0x65, 0x74, 0x74, 0x79, 0x2e, 0x67, 0x6c, 0x65, - 0x61, 0x6d, 0x79, 0x6e, 0x6f, 0x64, 0x65, 0x2e, - 0x6e, 0x65, 0x74, 0x30, 0x20, 0x17, 0x0d, 0x30, - 0x38, 0x30, 0x36, 0x31, 0x39, 0x30, 0x35, 0x34, - 0x31, 0x33, 0x38, 0x5a, 0x18, 0x0f, 0x32, 0x31, - 0x38, 0x37, 0x31, 0x31, 0x32, 0x34, 0x30, 0x35, - 0x34, 0x31, 0x33, 0x38, 0x5a, 0x30, 0x81, 0xa0, - 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, - 0x06, 0x13, 0x02, 0x4b, 0x52, 0x31, 0x13, 0x30, - 0x11, 0x06, 0x03, 0x55, 0x04, 0x08, 0x13, 0x0a, - 0x4b, 0x79, 0x75, 0x6e, 0x67, 0x67, 0x69, 0x2d, - 0x64, 0x6f, 0x31, 0x14, 0x30, 0x12, 0x06, 0x03, - 0x55, 0x04, 0x07, 0x13, 0x0b, 0x53, 0x65, 0x6f, - 0x6e, 0x67, 0x6e, 0x61, 0x6d, 0x2d, 0x73, 0x69, - 0x31, 0x1a, 0x30, 0x18, 0x06, 0x03, 0x55, 0x04, - 0x0a, 0x13, 0x11, 0x54, 0x68, 0x65, 0x20, 0x4e, - 0x65, 0x74, 0x74, 0x79, 0x20, 0x50, 0x72, 0x6f, - 0x6a, 0x65, 0x63, 0x74, 0x31, 0x18, 0x30, 0x16, - 0x06, 0x03, 0x55, 0x04, 0x0b, 0x13, 0x0f, 0x45, - 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x20, 0x41, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x73, 0x31, 0x30, - 0x30, 0x2e, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, - 0x27, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x63, - 0x68, 0x61, 0x74, 0x2e, 0x65, 0x78, 0x61, 0x6d, - 0x70, 0x6c, 0x65, 0x2e, 0x6e, 0x65, 0x74, 0x74, - 0x79, 0x2e, 0x67, 0x6c, 0x65, 0x61, 0x6d, 0x79, - 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x6e, 0x65, 0x74, - 0x30, 0x5c, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, - 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05, - 0x00, 0x03, 0x4b, 0x00, 0x30, 0x48, 0x02, 0x41, - 0x00, 0xc3, 0xe3, 0x5e, 0x41, 0xa7, 0x87, 0x11, - 0x00, 0x42, 0x2a, 0xb0, 0x4b, 0xed, 0xb2, 0xe0, - 0x23, 0xdb, 0xb1, 0x3d, 0x58, 0x97, 0x35, 0x60, - 0x0b, 0x82, 0x59, 0xd3, 0x00, 0xea, 0xd4, 0x61, - 0xb8, 0x79, 0x3f, 0xb6, 0x3c, 0x12, 0x05, 0x93, - 0x2e, 0x9a, 0x59, 0x68, 0x14, 0x77, 0x3a, 0xc8, - 0x50, 0x25, 0x57, 0xa4, 0x49, 0x18, 0x63, 0x41, - 0xf0, 0x2d, 0x28, 0xec, 0x06, 0xfb, 0xb4, 0x9f, - 0xbf, 0x02, 0x03, 0x01, 0x00, 0x01, 0x30, 0x0d, - 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, - 0x01, 0x01, 0x05, 0x05, 0x00, 0x03, 0x41, 0x00, - 0x65, 0x6c, 0x30, 0x01, 0xc2, 0x8e, 0x3e, 0xcb, - 0xb3, 0x77, 0x48, 0xe9, 0x66, 0x61, 0x9a, 0x40, - 0x86, 0xaf, 0xf6, 0x03, 0xeb, 0xba, 0x6a, 0xf2, - 0xfd, 0xe2, 0xaf, 0x36, 0x5e, 0x7b, 0xaa, 0x22, - 0x04, 0xdd, 0x2c, 0x20, 0xc4, 0xfc, 0xdd, 0xd0, - 0x82, 0x20, 0x1c, 0x3d, 0xd7, 0x9e, 0x5e, 0x5c, - 0x92, 0x5a, 0x76, 0x71, 0x28, 0xf5, 0x07, 0x7d, - 0xa2, 0x81, 0xba, 0x77, 0x9f, 0x2a, 0xd9, 0x44, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x05, 0x6d, 0x79, - 0x6b, 0x65, 0x79, 0x00, 0x00, 0x01, 0x1a, 0x9f, - 0x5b, 0x56, 0xa0, 0x00, 0x00, 0x01, 0x99, 0x30, - 0x82, 0x01, 0x95, 0x30, 0x0e, 0x06, 0x0a, 0x2b, - 0x06, 0x01, 0x04, 0x01, 0x2a, 0x02, 0x11, 0x01, - 0x01, 0x05, 0x00, 0x04, 0x82, 0x01, 0x81, 0x29, - 0xa8, 0xb6, 0x08, 0x0c, 0x85, 0x75, 0x3e, 0xdd, - 0xb5, 0xe5, 0x1a, 0x87, 0x68, 0xd1, 0x90, 0x4b, - 0x29, 0x31, 0xee, 0x90, 0xbc, 0x9d, 0x73, 0xa0, - 0x3f, 0xe9, 0x0b, 0xa4, 0xef, 0x30, 0x9b, 0x36, - 0x9a, 0xb2, 0x54, 0x77, 0x81, 0x07, 0x4b, 0xaa, - 0xa5, 0x77, 0x98, 0xe1, 0xeb, 0xb5, 0x7c, 0x4e, - 0x48, 0xd5, 0x08, 0xfc, 0x2c, 0x36, 0xe2, 0x65, - 0x03, 0xac, 0xe5, 0xf3, 0x96, 0xb7, 0xd0, 0xb5, - 0x3b, 0x92, 0xe4, 0x14, 0x05, 0x7a, 0x6a, 0x92, - 0x56, 0xfe, 0x4e, 0xab, 0xd3, 0x0e, 0x32, 0x04, - 0x22, 0x22, 0x74, 0x47, 0x7d, 0xec, 0x21, 0x99, - 0x30, 0x31,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x6f, 0xf0, 0x64, - 0x40, 0xe1, 0x44, 0xc4, 0xf9, 0x40, 0x2b, 0x3b, - 0x40, 0xdb, 0xaf, 0x35, 0xa4, 0x9b, 0x9f, 0xc4, - 0x74, 0x07, 0xe5, 0x18, 0x60, 0xc5, 0xfe, 0x15, - 0x0e, 0x3a, 0x25, 0x2a, 0x11, 0xee, 0x78, 0x2f, - 0xb8, 0xd1, 0x6e, 0x4e, 0x3c, 0x0a, 0xb5, 0xb9, - 0x40, 0x86, 0x27, 0x6d, 0x8f, 0x53, 0xb7, 0x77, - 0x36, 0xec, 0x5d, 0xed, 0x32, 0x40, 0x43, 0x82, - 0xc3, 0x52, 0x58, 0xc4, 0x26, 0x39, 0xf3, 0xb3, - 0xad, 0x58, 0xab, 0xb7, 0xf7, 0x8e, 0x0e, 0xba, - 0x8e, 0x78, 0x9d, 0xbf, 0x58, 0x34, 0xbd, 0x77, - 0x73, 0xa6, 0x50, 0x55, 0x00, 0x60, 0x26, 0xbf, - 0x6d, 0xb4, 0x98, 0x8a, 0x18, 0x83, 0x89, 0xf8, - 0xcd, 0x0d, 0x49, 0x06, 0xae, 0x51, 0x6e, 0xaf, - 0xbd, 0xe2, 0x07, 0x13, 0xd8, 0x64, 0xcc, 0xbf, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x05, 0x58, 0x2e, - 0x35, 0x30, 0x39, 0x00, 0x00, 0x02, 0x34, 0x30, - 0x82, 0x02, 0x30, 0x30, 0x82, 0x01, 0xda, 0xa0, - 0x03, 0x02, 0x01, 0x02, 0x02, 0x04, 0x48, 0x59, - 0xf2, 0x84, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, - 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x05, 0x05, - 0x00, 0x30, 0x81, 0x9d, 0x31, 0x0b, 0x30, 0x09, - 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x4b, - 0x52, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, - 0x04, 0x08, 0x13, 0x0a, 0x4b, 0x79, 0x75, 0x6e, - 0x67, 0x67, 0x69, 0x2d, 0x64, 0x6f, 0x31, 0x14, - 0x30, 0x12, 0x06, 0x03, 0x55, 0x04, 0x07, 0x13, - 0x0b, 0x53, 0x65, 0x6f, 0x6e, 0x67, 0x6e, 0x61, - 0x6d, 0x2d, 0x73, 0x69, 0x31, 0x1a, 0x30, 0x18, - 0x06, 0x03, 0x55, 0x04, 0x0a, 0x13, 0x11, 0x54, - 0x68, 0x65, 0x20, 0x4e, 0x65, 0x74, 0x74, 0x79, - 0x20, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, - 0x31, 0x15, 0x30, 0x13, 0x06, 0x03, 0x55, 0x04, - 0x0b, 0x13, 0x0c, 0x43, 0x6f, 0x6e, 0x74, 0x72, - 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x73, 0x31, - 0x30, 0x30, 0x2e, 0x06, 0x03, 0x55, 0x04, 0x03, - 0x13, 0x27, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, - 0x63, 0x68, 0x61, 0x74, 0x2e, 0x65, 0x78, 0x61, - 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x6e, 0x65, 0x74, - 0x74, 0x79, 0x2e, 0x67, 0x6c, 0x65, 0x61, 0x6d, - 0x79, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x6e, 0x65, - 0x74, 0x30, 0x20, 0x17, 0x0d, 0x30, 0x38, 0x30, - 0x36, 0x31, 0x39, 0x30, 0x35, 0x34, 0x35, 0x34, - 0x30, 0x5a, 0x18, 0x0f, 0x32, 0x31, 0x38, 0x37, - 0x31, 0x31, 0x32, 0x33, 0x30, 0x35, 0x34, 0x35, - 0x34, 0x30, 0x5a, 0x30, 0x81, 0x9d, 0x31, 0x0b, - 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, - 0x02, 0x4b, 0x52, 0x31, 0x13, 0x30, 0x11, 0x06, - 0x03, 0x55, 0x04, 0x08, 0x13, 0x0a, 0x4b, 0x79, - 0x75, 0x6e, 0x67, 0x67, 0x69, 0x2d, 0x64, 0x6f, - 0x31, 0x14, 0x30, 0x12, 0x06, 0x03, 0x55, 0x04, - 0x07, 0x13, 0x0b, 0x53, 0x65, 0x6f, 0x6e, 0x67, - 0x6e, 0x61, 0x6d, 0x2d, 0x73, 0x69, 0x31, 0x1a, - 0x30, 0x18, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x13, - 0x11, 0x54, 0x68, 0x65, 0x20, 0x4e, 0x65, 0x74, - 0x74, 0x79, 0x20, 0x50, 0x72, 0x6f, 0x6a, 0x65, - 0x63, 0x74, 0x31, 0x15, 0x30, 0x13, 0x06, 0x03, - 0x55, 0x04, 0x0b, 0x13, 0x0c, 0x43, 0x6f, 0x6e, - 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, - 0x73, 0x31, 0x30, 0x30, 0x2e, 0x06, 0x03, 0x55, - 0x04, 0x03, 0x13, 0x27, 0x73, 0x65, 0x63, 0x75, - 0x72, 0x65, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x65, - 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2e, 0x6e, - 0x65, 0x74, 0x74, 0x79, 0x2e, 0x67, 0x6c, 0x65, - 0x61, 0x6d, 0x79, 0x6e, 0x6f, 0x64, 0x65, 0x2e, - 0x6e, 0x65, 0x74, 0x30, 0x5c, 0x30, 0x0d, 0x06, - 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, - 0x01, 0x01, 0x05, 0x00, 0x03, 0x4b, 0x00, 0x30, - 0x48, 0x02, 0x41, 0x00, 0x95, 0xb3, 0x47, 0x17, - 0x95, 0x0f, 0x57, 0xcf, 0x66, 0x72, 0x0a, 0x7e, - 0x5b, 0x54, 0xea, 0x8c, 0x6f, 0x79, 0xde, 0x94, - 0xac, 0x0b, 0x5a, 0xd4, 0xd6, 0x1b, 0x58, 0x12, - 0x1a, 0x16, 0x3d, 0xfe, 0xdf, 0xa5, 0x2b, 0x86, - 0xbc, 0x64, 0xd4, 0x80, 0x1e, 0x3f, 0xf9, 0xe2, - 0x04, 0x03, 0x79, 0x9b, 0xc1, 0x5c, 0xf0, 0xf1, - 0xf3, 0xf1, 0xe3, 0xbf, 0x3f, 0xc0, 0x1f, 0xdd, - 0xdb, 0xc0, 0x5b, 0x21, 0x02, 0x03, 0x01, 0x00, - 0x01, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, - 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x05, 0x05, 0x00, - 0x03, 0x41, 0x00, 0x02, 0xd7, 0xdd, 0xbd, 0x0c, - 0x8e, 0x21, 0x20, 0xef, 0x9e, 0x4f, 0x1f, 0xf5, - 0x49, 0xf1, 0xae, 0x58, 0x9b, 0x94, 0x3a, 0x1f, - 0x70, 0x33, 0xf0, 0x9b, 0xbb, 0xe9, 0xc0, 0xf3, - 0x72, 0xcb, 0xde, 0xb6, 0x56, 0x72, 0xcc, 0x1c, - 0xf0, 0xd6, 0x5a, 0x2a, 0xbc, 0xa1, 0x7e, 0x23, - 0x83, 0xe9, 0xe7, 0xcf, 0x9e, 0xa5, 0xf9, 0xcc, - 0xc2, 0x61, 0xf4, 0xdb, 0x40, 0x93, 0x1d, 0x63, - 0x8a, 0x50, 0x4c, 0x11, 0x39, 0xb1, 0x91, 0xc1, - 0xe6, 0x9d, 0xd9, 0x1a, 0x62, 0x1b, 0xb8, 0xd3, - 0xd6, 0x9a, 0x6d, 0xb9, 0x8e, 0x15, 0x51 + 0xfe, 0xed, 0xfe, 0xed, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, + 0x00, 0x05, 0x6d, 0x79, 0x6b, 0x65, 0x79, 0x00, 0x00, 0x01, 0x37, 0x92, 0x1e, 0x7e, 0x32, 0x00, + 0x00, 0x05, 0x02, 0x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0x4d, 0x31, 0x53, 0x30, 0xda, 0xb9, 0x3f, 0xa6, 0x78, + 0xfd, 0xb5, 0x66, 0xb4, 0x75, 0x8f, 0xf8, 0x1d, 0x0b, 0x1c, 0x90, 0x15, 0x8f, 0xdc, 0xc5, 0xb3, + 0xac, 0xba, 0x56, 0x1c, 0xac, 0xfd, 0xeb, 0xe2, 0x67, 0x30, 0xb5, 0xb9, 0x9c, 0xc6, 0x92, 0x66, + 0x2c, 0x09, 0x1d, 0xab, 0x80, 0x48, 0x1c, 0xac, 0x8e, 0xff, 0x0d, 0xc3, 0x2e, 0x1a, 0x14, 0x16, + 0x0c, 0x64, 0x5a, 0xb4, 0x4d, 0x27, 0x12, 0x08, 0xa5, 0x6f, 0xb9, 0xce, 0xe9, 0x28, 0xae, 0x22, + 0xbb, 0x4d, 0x19, 0xd9, 0xff, 0xc7, 0xa4, 0x87, 0x71, 0xaa, 0x88, 0x95, 0xd8, 0x75, 0x34, 0x8a, + 0x94, 0x94, 0xf6, 0x48, 0xf0, 0xaa, 0xd1, 0x33, 0x12, 0x0e, 0x07, 0xbb, 0x63, 0x04, 0x75, 0x18, + 0x1c, 0x54, 0x4f, 0x1e, 0x1e, 0x73, 0xee, 0xb4, 0x0e, 0x99, 0xda, 0x1b, 0x59, 0xda, 0xd2, 0x21, + 0x58, 0xce, 0xe1, 0xfa, 0x9f, 0x7b, 0x76, 0x54, 0x18, 0x69, 0x4b, 0xb5, 0x56, 0x73, 0x63, 0xe9, + 0x62, 0xdc, 0x03, 0xea, 0x48, 0x3f, 0x93, 0x8c, 0x20, 0xbf, 0xc9, 0x94, 0xf0, 0x83, 0x1a, 0x39, + 0x70, 0x09, 0x48, 0x9c, 0x0d, 0x7a, 0x0c, 0x88, 0x5d, 0x1d, 0x8c, 0x1e, 0x59, 0x9a, 0xa4, 0xd4, + 0x4b, 0x01, 0x72, 0xdc, 0x97, 0xe8, 0x41, 0x50, 0xad, 0x0c, 0x85, 0x28, 0x6b, 0x35, 0x07, 0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x02, 0x48, 0x4b, 0xd1, 0x00, 0x00, 0x00, 0x01, 0x00, 0x05, 0x58, 0x2e, 0x35, 0x30, 0x39, + 0x00, 0x00, 0x03, 0x91, 0x30, 0x82, 0x03, 0x8d, 0x30, 0x82, 0x02, 0x75, 0xa0, 0x03, 0x02, 0x01, + 0x02, 0x02, 0x04, 0x2c, 0x61, 0xbc, 0x73, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, + 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x30, 0x77, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, + 0x06, 0x13, 0x02, 0x43, 0x59, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x08, 0x13, 0x0a, + 0x43, 0x79, 0x62, 0x65, 0x72, 0x73, 0x70, 0x61, 0x63, 0x65, 0x31, 0x14, 0x30, 0x12, 0x06, 0x03, + 0x55, 0x04, 0x07, 0x13, 0x0b, 0x4d, 0x6f, 0x6f, 0x6e, 0x20, 0x42, 0x61, 0x73, 0x65, 0x20, 0x31, + 0x31, 0x12, 0x30, 0x10, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x13, 0x09, 0x4d, 0x61, 0x76, 0x65, 0x72, + 0x69, 0x63, 0x6b, 0x73, 0x31, 0x15, 0x30, 0x13, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x13, 0x0c, 0x55, + 0x6e, 0x69, 0x74, 0x20, 0x54, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x31, 0x12, 0x30, 0x10, 0x06, + 0x03, 0x55, 0x04, 0x03, 0x13, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73, 0x74, 0x30, + 0x1e, 0x17, 0x0d, 0x31, 0x32, 0x30, 0x35, 0x32, 0x38, 0x30, 0x36, 0x32, 0x35, 0x30, 0x30, 0x5a, + 0x17, 0x0d, 0x33, 0x39, 0x31, 0x30, 0x31, 0x34, 0x30, 0x36, 0x32, 0x35, 0x30, 0x30, 0x5a, 0x30, + 0x77, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x43, 0x59, 0x31, 0x13, + 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x08, 0x13, 0x0a, 0x43, 0x79, 0x62, 0x65, 0x72, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x31, 0x14, 0x30, 0x12, 0x06, 0x03, 0x55, 0x04, 0x07, 0x13, 0x0b, 0x4d, 0x6f, + 0x6f, 0x6e, 0x20, 0x42, 0x61, 0x73, 0x65, 0x20, 0x31, 0x31, 0x12, 0x30, 0x10, 0x06, 0x03, 0x55, + 0x04, 0x0a, 0x13, 0x09, 0x4d, 0x61, 0x76, 0x65, 0x72, 0x69, 0x63, 0x6b, 0x73, 0x31, 0x15, 0x30, + 0x13, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x13, 0x0c, 0x55, 0x6e, 0x69, 0x74, 0x20, 0x54, 0x65, 0x73, + 0x74, 0x69, 0x6e, 0x67, 0x31, 0x12, 0x30, 0x10, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x09, 0x6c, + 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73, 0x74, 0x30, 0x82, 0x01, 0x22, 0x30, 0x0d, 0x06, 0x09, + 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03, 0x82, 0x01, 0x0f, 0x00, + 0x30, 0x82, 0x01, 0x0a, 0x02, 0x82, 0x01, 0x01, 0x00, 0xb9, 0x35, 0x73, 0xc2, 0xb4, 0x38, 0x04, + 0x57, 0xed, 0xd5, 0xee, 0xd7, 0xe4, 0x34, 0x64, 0xec, 0xc9, 0xf4, 0xef, 0x76, 0x39, 0x69, 0xc8, + 0x0c, 0xa0, 0x8b, 0x54, 0x05, 0x65, 0xe6, 0xb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 0xf8, 0xf4, 0x6f, + 0xed, 0x7f, 0x81, 0x6e, 0xa0, 0x67, 0x3d, 0xd7, 0x04, 0x66, 0x1c, 0x66, 0x27, 0xf9, 0x31, 0xff, + 0x5d, 0x66, 0xad, 0xcc, 0xd3, 0xbb, 0x94, 0x5d, 0xce, 0xe0, 0x34, 0xf5, 0x9a, 0xc5, 0xa4, 0x26, + 0x3f, 0x0f, 0x4c, 0x4b, 0x77, 0x0c, 0x50, 0x3c, 0xb3, 0x02, 0x03, 0x01, 0x00, 0x01, 0xa3, 0x21, + 0x30, 0x1f, 0x30, 0x1d, 0x06, 0x03, 0x55, 0x1d, 0x0e, 0x04, 0x16, 0x04, 0x14, 0xab, 0x18, 0x7a, + 0x2f, 0x6f, 0xad, 0xef, 0xb4, 0x9a, 0x1d, 0x17, 0x7d, 0x89, 0xdf, 0x06, 0x49, 0xdc, 0x3e, 0x41, + 0x18, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, + 0x03, 0x82, 0x01, 0x01, 0x00, 0x69, 0x8d, 0x84, 0xe5, 0x82, 0xde, 0x62, 0x09, 0x75, 0xc0, 0x31, + 0xab, 0xcf, 0xbd, 0x2f, 0x06, 0x55, 0xdb, 0xda, 0xef, 0xba, 0xcc, 0x46, 0x9f, 0x7c, 0x84, 0xe1, + 0x85, 0x76, 0x35, 0xa0, 0xf5, 0xc9, 0x20, 0x2d, 0x67, 0x19, 0x28, 0x8b, 0x38, 0x73, 0x5c, 0x12, + 0xa0, 0x72, 0x4f, 0x3d, 0x52, 0x99, 0xf6, 0xc5, 0x06, 0x6d, 0xef, 0xd6, 0xd9, 0x76, 0x82, 0x6e, + 0x78, 0xaf, 0x9f, 0x3c, 0x83, 0x83, 0xe5, 0xb1, 0x11, 0x33, 0x6c, 0xb2, 0x79, 0xdd, 0xbb, 0x71, + 0x44, 0x97, 0x72, 0xd6, 0x2c, 0x91, 0x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0xc2, 0xfa, 0x13, + 0x6f, 0x74, 0x2d, 0x33, 0x26, 0x7e, 0xc4, 0xe5, 0x25 }; public static InputStream asInputStream() { From e6af6dddf66b4929cc62ec72e680820d77b4420d Mon Sep 17 00:00:00 2001 From: Henry Story Date: Fri, 8 Jun 2012 17:58:28 +0200 Subject: [PATCH 2/3] TLS server settable from config and more efficient --- .../scala/play/core/server/NettyServer.scala | 100 +++++++++++++----- .../src/main/scala/play/core/utils/IO.scala | 14 +++ 2 files changed, 87 insertions(+), 27 deletions(-) create mode 100644 framework/src/play/src/main/scala/play/core/utils/IO.scala diff --git a/framework/src/play/src/main/scala/play/core/server/NettyServer.scala b/framework/src/play/src/main/scala/play/core/server/NettyServer.scala index 55d4877599c..708c449f929 100644 --- a/framework/src/play/src/main/scala/play/core/server/NettyServer.scala +++ b/framework/src/play/src/main/scala/play/core/server/NettyServer.scala @@ -1,15 +1,9 @@ package play.core.server -import org.jboss.netty.buffer._ import org.jboss.netty.channel._ import org.jboss.netty.bootstrap._ import org.jboss.netty.channel.Channels._ import org.jboss.netty.handler.codec.http._ -import org.jboss.netty.channel.socket.nio._ -import org.jboss.netty.handler.stream._ -import org.jboss.netty.handler.codec.http.HttpHeaders._ -import org.jboss.netty.handler.codec.http.HttpHeaders.Names._ -import org.jboss.netty.handler.codec.http.HttpHeaders.Values._ import org.jboss.netty.channel.group._ import org.jboss.netty.handler.ssl._ @@ -18,15 +12,12 @@ import javax.net.ssl._ import java.util.concurrent._ import play.core._ -import play.core.server.websocket._ import play.api._ -import play.api.mvc._ -import play.api.libs.iteratee._ -import play.api.libs.iteratee.Input._ -import play.api.libs.concurrent._ import play.core.server.netty._ -import scala.collection.JavaConverters._ +import java.security.cert.X509Certificate +import java.io.{File, FileInputStream} +import utils.IO /** * provides a stopable Server @@ -48,26 +39,73 @@ class NettyServer(appProvider: ApplicationProvider, port: Int, sslPort: Option[I Executors.newCachedThreadPool())) class PlayPipelineFactory(secure: Boolean = false) extends ChannelPipelineFactory { + def getPipeline = { val newPipeline = pipeline() - - if (secure) { - val keyStore = KeyStore.getInstance("JKS") - keyStore.load(FakeKeyStore.asInputStream, FakeKeyStore.getKeyStorePassword) - val kmf = KeyManagerFactory.getInstance("SunX509") - kmf.init(keyStore, FakeKeyStore.getCertificatePassword) - val sslContext = SSLContext.getInstance("TLS") - sslContext.init(kmf.getKeyManagers, null, null) - val sslEngine = sslContext.createSSLEngine + sslContext.map{ ctxt => + val sslEngine = ctxt.createSSLEngine sslEngine.setUseClientMode(false) newPipeline.addLast("ssl", new SslHandler(sslEngine)) } - newPipeline.addLast("decoder", new HttpRequestDecoder(4096, 8192, 8192)) newPipeline.addLast("encoder", new HttpResponseEncoder()) newPipeline.addLast("handler", defaultUpStreamHandler) newPipeline } + + lazy val sslContext: Option[SSLContext] = //the sslContext should be reused on each connection + for (tlsPort <- sslPort; + app <- appProvider.get.right.toOption ) + yield { + val config = app.configuration + val ksAttr = "https.port" + tlsPort + ".keystore" + val keyStore = KeyStore.getInstance(config.getString(ksAttr + ".type").getOrElse("JKS")) + val kmfOpt: Option[Option[KeyManagerFactory]] = for ( + path <- config.getString(ksAttr + ".location"); + alias <- config.getString(ksAttr + ".alias"); + password <- config.getString(ksAttr + ".password").orElse(Some("")).map(_.toCharArray); + algorithm <- config.getString(ksAttr + ".algorithm").orElse(Option(KeyManagerFactory.getDefaultAlgorithm)) + ) yield { + //Logger("play").info("path="+path+" alias="+alias+" password="+password+" alg="+algorithm) + val file = new File(path) + if (file.isFile) { + IO.use(new FileInputStream(file)) { + in => + keyStore.load(in, password) + } + Logger("play").info("for port " + tlsPort + " using keystore at " + file) + val kmf = KeyManagerFactory.getInstance(algorithm) + kmf.init(keyStore, password) //there should be a certificate keystore + Some(kmf) + } else None + } + val kmf = kmfOpt.flatMap(a => a).orElse { + Logger("play").warn("using localhost fake keystore for ssl connection on port " + sslPort.get) + keyStore.load(FakeKeyStore.asInputStream, FakeKeyStore.getKeyStorePassword) + val kmf = KeyManagerFactory.getInstance("SunX509") + kmf.init(keyStore, FakeKeyStore.getCertificatePassword) + Some(kmf) + }.get + + val sslContext = SSLContext.getInstance("TLS") + val tm = config.getString(ksAttr + ".trust").map { + case "noCA" => { + Logger("play").warn("secure http server (https) on port " + sslPort.get + " with no client " + + "side CA verification. Requires http://webid.info/ for client certifiate verification.") + Array[TrustManager](noCATrustManager) + } + case path => { + Logger("play").info("no trust info for port " + tlsPort) + null + } //for the moment + }.getOrElse { + Logger("play").info("no trust attribute for port " + tlsPort) + null + } + sslContext.init(kmf.getKeyManagers, tm, new SecureRandom()) + sslContext + } + } // Keep a reference on all opened channels (useful to close everything properly, especially in DEV mode) @@ -134,13 +172,19 @@ class NettyServer(appProvider: ApplicationProvider, port: Int, sslPort: Option[I } +object noCATrustManager extends X509TrustManager { + val nullArray = Array[X509Certificate]() + def checkClientTrusted(x509Certificates: Array[X509Certificate], s: String) {} + def checkServerTrusted(x509Certificates: Array[X509Certificate], s: String) {} + def getAcceptedIssuers() = nullArray +} + /** * bootstraps Play application with a NettyServer backened */ object NettyServer { import java.io._ - import java.net._ /** * creates a NettyServer based on the application represented by applicationPath @@ -170,11 +214,13 @@ object NettyServer { } try { + val app = new StaticApplication(applicationPath) + val config = app.application.configuration val server = new NettyServer( - new StaticApplication(applicationPath), - Option(System.getProperty("http.port")).map(Integer.parseInt(_)).getOrElse(9000), - Option(System.getProperty("https.port")).map(Integer.parseInt(_)), - Option(System.getProperty("http.address")).getOrElse("0.0.0.0")) + app, + config.getInt("http.port").getOrElse(9000), + config.getInt("https.port"), + config.getString("http.address").getOrElse("0.0.0.0")) Runtime.getRuntime.addShutdownHook(new Thread { override def run { diff --git a/framework/src/play/src/main/scala/play/core/utils/IO.scala b/framework/src/play/src/main/scala/play/core/utils/IO.scala new file mode 100644 index 00000000000..ea0d6f21b28 --- /dev/null +++ b/framework/src/play/src/main/scala/play/core/utils/IO.scala @@ -0,0 +1,14 @@ +package play.core.utils + +// Taken from slide 21 of Martin Odersky's http://www.scala-lang.org/node/1261 +// please move to util. +trait IO { + /** Manage the usage of some object that must be closed after use */ + def use[R <: { def close() }, T](resource: R)(f: R => T): T = try { + f(resource) + } finally { + if (resource != null) resource.close() + } +} + +object IO extends IO \ No newline at end of file From addcbc0d91e910b53624ec240d2371e34da3c881 Mon Sep 17 00:00:00 2001 From: Henry Story Date: Fri, 15 Jun 2012 19:29:08 +0200 Subject: [PATCH 3/3] don't allow TLS behavior on http port --- .../src/main/scala/play/core/server/NettyServer.scala | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/framework/src/play/src/main/scala/play/core/server/NettyServer.scala b/framework/src/play/src/main/scala/play/core/server/NettyServer.scala index 708c449f929..1619d72235b 100644 --- a/framework/src/play/src/main/scala/play/core/server/NettyServer.scala +++ b/framework/src/play/src/main/scala/play/core/server/NettyServer.scala @@ -42,10 +42,12 @@ class NettyServer(appProvider: ApplicationProvider, port: Int, sslPort: Option[I def getPipeline = { val newPipeline = pipeline() - sslContext.map{ ctxt => - val sslEngine = ctxt.createSSLEngine - sslEngine.setUseClientMode(false) - newPipeline.addLast("ssl", new SslHandler(sslEngine)) + if (secure) { + sslContext.map { ctxt => + val sslEngine = ctxt.createSSLEngine + sslEngine.setUseClientMode(false) + newPipeline.addLast("ssl", new SslHandler(sslEngine)) + } } newPipeline.addLast("decoder", new HttpRequestDecoder(4096, 8192, 8192)) newPipeline.addLast("encoder", new HttpResponseEncoder())