logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgo...@apache.org
Subject svn commit: r1520406 [2/3] - in /logging/log4j/log4j2/trunk: log4j-core/src/main/java/org/apache/logging/log4j/core/appender/ log4j-core/src/main/java/org/apache/logging/log4j/core/layout/ log4j-core/src/main/java/org/apache/logging/log4j/core/net/ log...
Date Thu, 05 Sep 2013 20:02:35 GMT
Added: logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/SyslogAppenderTestBase.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/SyslogAppenderTestBase.java?rev=1520406&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/SyslogAppenderTestBase.java (added)
+++ logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/SyslogAppenderTestBase.java Thu Sep  5 20:02:34 2013
@@ -0,0 +1,143 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache license, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
+ */
+package org.apache.logging.log4j.core.appender;
+
+import org.apache.logging.log4j.Level;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.MarkerManager;
+import org.apache.logging.log4j.ThreadContext;
+import org.apache.logging.log4j.core.Appender;
+import org.apache.logging.log4j.core.Logger;
+import org.apache.logging.log4j.core.LoggerContext;
+import org.apache.logging.log4j.core.net.mock.MockSyslogServer;
+import org.apache.logging.log4j.core.net.mock.MockSyslogServerFactory;
+import org.apache.logging.log4j.message.StructuredDataMessage;
+import org.junit.BeforeClass;
+
+import java.io.IOException;
+import java.net.SocketException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+public class SyslogAppenderTestBase {
+    protected static final String line1 =
+            "TestApp - Audit [Transfer@18060 Amount=\"200.00\" FromAccount=\"123457\" ToAccount=\"123456\"]" +
+                    "[RequestContext@18060 ipAddress=\"192.168.0.120\" loginId=\"JohnDoe\"] Transfer Complete";
+    protected LoggerContext ctx = (LoggerContext) LogManager.getContext();
+    protected static final int DEFAULT_TIMEOUT_IN_MS = 100;
+    protected static final String PORT = "8199";
+    protected static final int PORTNUM = Integer.parseInt(PORT);
+    protected MockSyslogServer syslogServer;
+    protected SyslogAppender appender;
+    protected Logger root = ctx.getLogger("SyslogAppenderTest");
+    protected List<String> sentMessages = new ArrayList<String>();
+    protected String includeNewLine = "true";
+
+    @BeforeClass
+    public static void setupClass() throws Exception {
+        ((LoggerContext) LogManager.getContext()).reconfigure();
+    }
+
+    protected void sendAndCheckLegacyBSDMessages(List<String> messagesToSend) throws InterruptedException {
+        for (String message : messagesToSend)
+            sendLegacyBSDMessage(message);
+        checkTheNumberOfSentAndReceivedMessages();
+        checkTheEqualityOfSentAndReceivedMessages();
+    }
+
+    protected void sendAndCheckLegacyBSDMessage(String message) throws InterruptedException {
+        sendLegacyBSDMessage(message);
+        checkTheNumberOfSentAndReceivedMessages();
+        checkTheEqualityOfSentAndReceivedMessages();
+    }
+
+    protected void sendLegacyBSDMessage(String message) {
+        sentMessages.add(message);
+        root.debug(message);
+    }
+
+    protected void sendAndCheckStructuredMessages(int numberOfMessages) throws InterruptedException {
+        for (int i = 0; i < numberOfMessages; i++)
+            sendStructuredMessage();
+        checkTheNumberOfSentAndReceivedMessages();
+        checkTheEqualityOfSentAndReceivedMessages();
+    }
+
+    protected void sendAndCheckStructuredMessage() throws InterruptedException {
+        sendStructuredMessage();
+        checkTheNumberOfSentAndReceivedMessages();
+        checkTheEqualityOfSentAndReceivedMessages();
+    }
+
+    protected void sendStructuredMessage() {
+        ThreadContext.put("loginId", "JohnDoe");
+        ThreadContext.put("ipAddress", "192.168.0.120");
+        ThreadContext.put("locale", Locale.US.getDisplayName());
+        final StructuredDataMessage msg = new StructuredDataMessage("Transfer@18060", "Transfer Complete", "Audit");
+        msg.put("ToAccount", "123456");
+        msg.put("FromAccount", "123457");
+        msg.put("Amount", "200.00");
+        // the msg.toString() doesn't contain the parameters of the ThreadContext, so we must use the line1 string
+        sentMessages.add(line1);
+        root.info(MarkerManager.getMarker("EVENT"), msg);
+    }
+
+    protected void checkTheNumberOfSentAndReceivedMessages() throws InterruptedException {
+        assertEquals("The number of received messages should be equal with the number of sent messages",
+                sentMessages.size(), getReceivedMessages(DEFAULT_TIMEOUT_IN_MS).size());
+    }
+
+    protected void checkTheEqualityOfSentAndReceivedMessages() throws InterruptedException {
+        List<String> receivedMessages = getReceivedMessages(DEFAULT_TIMEOUT_IN_MS);
+
+        assertNotNull("No messages received", receivedMessages);
+        for (int i = 0; i < receivedMessages.size(); i++) {
+            String receivedMessage = receivedMessages.get(i);
+            String sentMessage = sentMessages.get(i);
+            String suffix =  "true".equalsIgnoreCase(includeNewLine) ? "\n" : "";
+            assertTrue("Incorrect message received: " + receivedMessage, receivedMessage.endsWith(sentMessage + suffix));
+        }
+    }
+
+    protected void removeAppenders() {
+        final Map<String,Appender> map = root.getAppenders();
+        for (final Map.Entry<String, Appender> entry : map.entrySet()) {
+            final Appender app = entry.getValue();
+            root.removeAppender(app);
+            app.stop();
+        }
+    }
+
+    protected void initRootLogger(Appender appender) {
+        root.addAppender(appender);
+        root.setAdditive(false);
+        root.setLevel(Level.DEBUG);
+    }
+
+    protected List<String> getReceivedMessages(int timeOutInMs) throws InterruptedException {
+        synchronized (syslogServer) {
+            syslogServer.wait(timeOutInMs);
+        }
+        return syslogServer.getMessageList();
+    }
+}

Added: logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/TLSSyslogAppenderTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/TLSSyslogAppenderTest.java?rev=1520406&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/TLSSyslogAppenderTest.java (added)
+++ logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/TLSSyslogAppenderTest.java Thu Sep  5 20:02:34 2013
@@ -0,0 +1,110 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache license, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
+ */
+package org.apache.logging.log4j.core.appender;
+
+import org.apache.logging.log4j.core.net.mock.MockSyslogServerFactory;
+import org.apache.logging.log4j.core.net.ssl.*;
+import org.junit.Test;
+
+import javax.net.ssl.SSLServerSocket;
+import javax.net.ssl.SSLServerSocketFactory;
+import java.io.IOException;
+import java.util.List;
+
+public class TLSSyslogAppenderTest extends SyslogAppenderTest{
+
+    private SSLServerSocketFactory serverSocketFactory;
+    private TLSSyslogMessageFormat messageFormat;
+    private SSLConfiguration sslConfig;
+
+    public TLSSyslogAppenderTest() throws SSLConfigurationException {
+        initServerSocketFactory();
+        root = ctx.getLogger("TLSSyslogAppenderTest");
+    }
+
+    @Test
+    public void sendLargeLegacyBSDMessageOverTLS() throws IOException, InterruptedException {
+        String prefix = "BEGIN";
+        initTLSTestEnvironment(1, TLSSyslogMessageFormat.LEGACY_BSD);
+
+        StringBuilder builder = new StringBuilder(prefix);
+        for (int i = 0; i < 2 * 1024 * 2014; i++) {
+            builder.append('a');
+        }
+        String message = builder.toString();
+        sendAndCheckLegacyBSDMessage(message);
+    }
+
+    @Test
+    public void sendLegacyBSDMessagesOverTLS() throws IOException, InterruptedException {
+        int numberOfMessages = 100;
+        initTLSTestEnvironment(100, TLSSyslogMessageFormat.LEGACY_BSD);
+
+        List<String> sentMessages = TLSSyslogTestUtil.generateMessages(numberOfMessages, TLSSyslogMessageFormat.LEGACY_BSD);
+        sendAndCheckLegacyBSDMessages(sentMessages);
+    }
+
+    @Test
+    public void sendStructuredMessageOverTLS() throws InterruptedException, IOException {
+        initTLSTestEnvironment(1, TLSSyslogMessageFormat.SYSLOG);
+
+        sendAndCheckStructuredMessage();
+    }
+
+    @Test
+    public void sendStructuredMessagesOverTLS() throws IOException, InterruptedException {
+        int numberOfMessages = 100;
+        initTLSTestEnvironment(100, TLSSyslogMessageFormat.SYSLOG);
+
+        sendAndCheckStructuredMessages(numberOfMessages);
+    }
+
+    private void initServerSocketFactory() {
+        KeyStoreConfiguration ksc = new KeyStoreConfiguration(TestConstants.KEYSTORE_FILE, TestConstants.KEYSTORE_PWD);
+        TrustStoreConfiguration tsc = new TrustStoreConfiguration(TestConstants.TRUSTSTORE_FILE, TestConstants.TRUSTSTORE_PWD);
+        sslConfig = SSLConfiguration.createSSLConfiguration(ksc, tsc);
+        serverSocketFactory = sslConfig.getSSLServerSocketFactory();
+    }
+
+    private TLSSyslogAppender createAppender() {
+        String format;
+
+        if (messageFormat == TLSSyslogMessageFormat.LEGACY_BSD)
+            format = "LEGACY_BSD";
+        else
+            format = "RFC5424";
+
+        return TLSSyslogAppender.createAppender("localhost", PORT, sslConfig, "-1", null, "Test", "true", "false", "LOCAL0", "Audit",
+                "18060", "true", "RequestContext", null, null, includeNewLine, null, "TestApp", "Test", null, "ipAddress,loginId",
+                null, format, null, null, null, null, null, null);
+    }
+
+    private void initTLSTestEnvironment(int numberOfMessages, TLSSyslogMessageFormat messageFormat) throws IOException {
+        this.messageFormat = messageFormat;
+        SSLServerSocket sslServerSocket = (SSLServerSocket) serverSocketFactory.createServerSocket(PORTNUM);
+
+        syslogServer = MockSyslogServerFactory.createTLSSyslogServer(numberOfMessages, messageFormat, sslServerSocket);
+        syslogServer.start();
+        initAppender();
+    }
+
+    protected void initAppender() {
+        appender = createAppender();
+        appender.start();
+        initRootLogger(appender);
+    }
+}

Added: logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/TLSSyslogFrameTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/TLSSyslogFrameTest.java?rev=1520406&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/TLSSyslogFrameTest.java (added)
+++ logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/TLSSyslogFrameTest.java Thu Sep  5 20:02:34 2013
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache license, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
+ */
+package org.apache.logging.log4j.core.appender;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import java.util.Arrays;
+
+public class TLSSyslogFrameTest {
+    private static final String TESTMESSAGE = "The quick brown fox jumps over the lazy dog";
+
+    @Test
+    public void messageSetByConstructor() {
+        TLSSyslogFrame frame = new TLSSyslogFrame(TESTMESSAGE);
+        byte[] representation = frame.getBytes();
+        byte[] expected = getByteRepresentation(TESTMESSAGE);
+        Assert.assertTrue(Arrays.equals(representation, expected));
+    }
+
+    @Test
+    public void messageSetBySetter() {
+        TLSSyslogFrame frame = new TLSSyslogFrame("Some text");
+        frame.setMessage(TESTMESSAGE);
+        byte[] representation = frame.getBytes();
+        byte[] expected = getByteRepresentation(TESTMESSAGE);
+        Assert.assertTrue(Arrays.equals(representation, expected));
+    }
+
+    @Test
+    public void checkGetBytes() {
+        TLSSyslogFrame frame = new TLSSyslogFrame(TESTMESSAGE);
+        byte[] representation = frame.getBytes();
+        byte[] expected = getByteRepresentation(TESTMESSAGE);
+        Assert.assertTrue(Arrays.equals(representation, expected));
+    }
+
+    private byte[] getByteRepresentation(String message) {
+        String frame = message.length() + Character.toString(TLSSyslogFrame.SPACE) + message;
+        byte[] representation = frame.getBytes();
+        return representation;
+    }
+
+    @Test
+    public void equals() {
+        TLSSyslogFrame first = new TLSSyslogFrame("A message");
+        TLSSyslogFrame second = new TLSSyslogFrame("A message");
+        Assert.assertTrue(first.equals(second));
+    }
+
+    @Test
+    public void notEquals() {
+        TLSSyslogFrame first = new TLSSyslogFrame("A message");
+        TLSSyslogFrame second = new TLSSyslogFrame("B message");
+        Assert.assertFalse(first.equals(second));
+    }
+}
\ No newline at end of file

Modified: logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/db/jpa/JpaH2AppenderTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/db/jpa/JpaH2AppenderTest.java?rev=1520406&r1=1520405&r2=1520406&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/db/jpa/JpaH2AppenderTest.java (original)
+++ logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/db/jpa/JpaH2AppenderTest.java Thu Sep  5 20:02:34 2013
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache license, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
+ */
 package org.apache.logging.log4j.core.appender.db.jpa;
 
 import java.sql.Connection;

Modified: logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/db/jpa/JpaHyperSqlAppenderTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/db/jpa/JpaHyperSqlAppenderTest.java?rev=1520406&r1=1520405&r2=1520406&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/db/jpa/JpaHyperSqlAppenderTest.java (original)
+++ logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/db/jpa/JpaHyperSqlAppenderTest.java Thu Sep  5 20:02:34 2013
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache license, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
+ */
 package org.apache.logging.log4j.core.appender.db.jpa;
 
 import java.sql.Connection;

Modified: logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/layout/RFC5424LayoutTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/layout/RFC5424LayoutTest.java?rev=1520406&r1=1520405&r2=1520406&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/layout/RFC5424LayoutTest.java (original)
+++ logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/layout/RFC5424LayoutTest.java Thu Sep  5 20:02:34 2013
@@ -39,6 +39,7 @@ import java.util.Arrays;
 import java.util.List;
 import java.util.Locale;
 
+import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 
 public class RFC5424LayoutTest {
@@ -82,7 +83,7 @@ public class RFC5424LayoutTest {
         }
         // set up appender
         final AbstractStringLayout layout = RFC5424Layout.createLayout("Local0", "Event", "3692", "true", "RequestContext",
-            null, null, "true", null, "ATM", null, "key1, key2, locale", null, "loginId", null, null, null);
+            null, null, "true", null, "ATM", null, "key1, key2, locale", null, "loginId", null, "true", null, null);
         final ListAppender appender = new ListAppender("List", null, layout, true, false);
 
         appender.start();
@@ -119,6 +120,21 @@ public class RFC5424LayoutTest {
             assertTrue("Expected line 3 to end with: " + line3 + " Actual " + list.get(2), list.get(2).endsWith(line3));
             assertTrue("Expected line 4 to end with: " + line4 + " Actual " + list.get(3), list.get(3).endsWith(line4));
 
+            for (String frame : list) {
+                int length = -1;
+                int frameLength = frame.length();
+                int firstSpacePosition = frame.indexOf(' ');
+                String messageLength = frame.substring(0, firstSpacePosition);
+                try {
+                    length = Integer.parseInt(messageLength);
+                    // the ListAppender removes the ending newline, so we expect one less size
+                    assertEquals(frameLength, messageLength.length() + length);
+                }
+                catch (NumberFormatException e) {
+                    assertTrue("Not a valid RFC 5425 frame", false);
+                }
+            }
+
             appender.clear();
 
             ThreadContext.remove("loginId");
@@ -133,7 +149,6 @@ public class RFC5424LayoutTest {
 
             appender.stop();
         }
-
     }
 
     /**
@@ -146,7 +161,7 @@ public class RFC5424LayoutTest {
         }
         // set up layout/appender
         final AbstractStringLayout layout = RFC5424Layout.createLayout("Local0", "Event", "3692", "true", "RequestContext",
-            null, null, "true", "#012", "ATM", null, "key1, key2, locale", null, "loginId", null, null, null);
+            null, null, "true", "#012", "ATM", null, "key1, key2, locale", null, "loginId", null, "true", null, null);
         final ListAppender appender = new ListAppender("List", null, layout, true, false);
 
         appender.start();
@@ -196,7 +211,6 @@ public class RFC5424LayoutTest {
 
             appender.stop();
         }
-
     }
 
     /**
@@ -209,7 +223,7 @@ public class RFC5424LayoutTest {
         }
         // set up layout/appender
         final AbstractStringLayout layout = RFC5424Layout.createLayout("Local0", "Event", "3692", "true", "RequestContext",
-            null, null, "true", null, "ATM", null, "key1, key2, locale", null, "loginId", "%xEx", null, null);
+            null, null, "true", null, "ATM", null, "key1, key2, locale", null, "loginId", "%xEx", "true", null, null);
         final ListAppender appender = new ListAppender("List", null, layout, true, false);
         appender.start();
 
@@ -255,7 +269,7 @@ public class RFC5424LayoutTest {
 
         // set up layout/appender
         final AbstractStringLayout layout = RFC5424Layout.createLayout("Local0", "Event", "3692", "true", "RequestContext",
-            null, null, "true", null, "ATM", null, "key1, key2, locale", null, null, null, loggerFields, null);
+            null, null, "true", null, "ATM", null, "key1, key2, locale", null, null, null, "true", loggerFields, null);
         final ListAppender appender = new ListAppender("List", null, layout, true, false);
         appender.start();
 
@@ -302,7 +316,7 @@ public class RFC5424LayoutTest {
         };
 
         final AbstractStringLayout layout = RFC5424Layout.createLayout("Local0", "Event", "3692", "true", "RequestContext",
-                null, null, "true", null, "ATM", null, "key1, key2, locale", null, null, null, loggerFields, null);
+                null, null, "true", null, "ATM", null, "key1, key2, locale", null, null, null, null, loggerFields, null);
         final ListAppender appender = new ListAppender("List", null, layout, true, false);
         appender.start();
 
@@ -351,7 +365,7 @@ public class RFC5424LayoutTest {
         };
 
         final AbstractStringLayout layout = RFC5424Layout.createLayout("Local0", "Event", "3692", "true", mdcId,
-                null, null, "true", null, "ATM", null, "key1, key2, locale", null, null, null, loggerFields, null);
+                null, null, "true", null, "ATM", null, "key1, key2, locale", null, null, null, null, loggerFields, null);
         final ListAppender appender = new ListAppender("List", null, layout, true, false);
         appender.start();
 
@@ -388,7 +402,7 @@ public class RFC5424LayoutTest {
         }
 
         final AbstractStringLayout layout = RFC5424Layout.createLayout("Local0", "Event", "3692", "false", mdcId,
-                null, null, "true", null, "ATM", "MSG-ID", "key1, key2, locale", null, null, null, null, null);
+                null, null, "true", null, "ATM", "MSG-ID", "key1, key2, locale", null, null, null, null, null, null);
         final ListAppender appender = new ListAppender("List", null, layout, true, false);
         appender.start();
 

Added: logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/mock/MockSyslogServer.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/mock/MockSyslogServer.java?rev=1520406&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/mock/MockSyslogServer.java (added)
+++ logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/mock/MockSyslogServer.java Thu Sep  5 20:02:34 2013
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache license, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
+ */
+package org.apache.logging.log4j.core.net.mock;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class MockSyslogServer extends Thread {
+    protected List<String> messageList;
+    protected int port;
+    private int numberOfMessagesToReceive;
+
+    public MockSyslogServer(int numberOfMessagesToReceive, int port) {
+        this.numberOfMessagesToReceive = numberOfMessagesToReceive;
+        this.messageList = new ArrayList<String>();
+        this.port = port;
+    }
+
+    @Override
+    public void run() {
+
+    }
+
+    public void shutdown() {
+
+    }
+
+    public int getNumberOfReceivedMessages() {
+        return messageList.size();
+    }
+
+    public List<String> getMessageList() {
+        return messageList;
+    }
+}

Added: logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/mock/MockSyslogServerFactory.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/mock/MockSyslogServerFactory.java?rev=1520406&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/mock/MockSyslogServerFactory.java (added)
+++ logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/mock/MockSyslogServerFactory.java Thu Sep  5 20:02:34 2013
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache license, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
+ */
+package org.apache.logging.log4j.core.net.mock;
+
+import org.apache.logging.log4j.core.net.ssl.TLSSyslogMessageFormat;
+
+import javax.net.ssl.SSLServerSocket;
+import java.io.IOException;
+import java.net.SocketException;
+
+public class MockSyslogServerFactory {
+
+    public static MockSyslogServer createUDPSyslogServer(int numberOfMessagesToReceive, int port) throws SocketException {
+        return new MockUDPSyslogServer(numberOfMessagesToReceive, port);
+    }
+
+    public static MockSyslogServer createTCPSyslogServer(int numberOfMessagesToReceive, int port) throws IOException {
+        return new MockTCPSyslogServer(numberOfMessagesToReceive, port);
+    }
+
+    public static MockSyslogServer createTLSSyslogServer(int numberOfMessagesToReceive, TLSSyslogMessageFormat format, SSLServerSocket serverSocket) {
+        return new MockTLSSyslogServer(numberOfMessagesToReceive, format, serverSocket);
+   }
+}

Added: logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/mock/MockTCPSyslogServer.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/mock/MockTCPSyslogServer.java?rev=1520406&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/mock/MockTCPSyslogServer.java (added)
+++ logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/mock/MockTCPSyslogServer.java Thu Sep  5 20:02:34 2013
@@ -0,0 +1,76 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache license, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
+ */
+package org.apache.logging.log4j.core.net.mock;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.ServerSocket;
+import java.net.Socket;
+
+public class MockTCPSyslogServer extends MockSyslogServer {
+    private final ServerSocket sock;
+    private boolean shutdown = false;
+    private Thread thread;
+
+    public MockTCPSyslogServer(int numberOfMessagesToReceive, int port) throws IOException {
+        super(numberOfMessagesToReceive, port);
+        sock = new ServerSocket(port);
+    }
+
+    public void shutdown() {
+        this.shutdown = true;
+        try {
+            sock.close();
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+        thread.interrupt();
+    }
+
+    @Override
+    public void run() {
+        this.thread = Thread.currentThread();
+        while (!shutdown) {
+            try {
+                final byte[] buffer = new byte[4096];
+                final Socket socket = sock.accept();
+                socket.setSoLinger(true, 0);
+                if (socket != null) {
+                    final InputStream in = socket.getInputStream();
+                    int i = in.read(buffer, 0, buffer.length);
+                    while (i != -1) {
+                        if (i < buffer.length) {
+                            final String line = new String(buffer, 0, i);
+                            messageList.add(line);
+                            i = in.read(buffer, 0, buffer.length);
+                        } else if (i == 0) {
+                            System.out.println("No data received");
+                        } else {
+                            System.out.println("Message too long");
+                        }
+                    }
+
+                    socket.close();
+                }
+            } catch (final Exception ex) {
+                if (!shutdown) {
+                    System.out.println("Caught exception: " + ex.getMessage());
+                }
+            }
+        }
+    }
+}

Added: logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/mock/MockTLSSyslogServer.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/mock/MockTLSSyslogServer.java?rev=1520406&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/mock/MockTLSSyslogServer.java (added)
+++ logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/mock/MockTLSSyslogServer.java Thu Sep  5 20:02:34 2013
@@ -0,0 +1,133 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache license, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
+ */
+package org.apache.logging.log4j.core.net.mock;
+
+import org.apache.logging.log4j.core.net.ssl.LegacyBSDTLSSyslogInputStreamReader;
+import org.apache.logging.log4j.core.net.ssl.TLSSyslogInputStreamReader;
+import org.apache.logging.log4j.core.net.ssl.TLSSyslogInputStreamReaderBase;
+import org.apache.logging.log4j.core.net.ssl.TLSSyslogMessageFormat;
+
+import javax.net.ssl.SSLServerSocket;
+import javax.net.ssl.SSLSocket;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.List;
+
+public class MockTLSSyslogServer extends MockSyslogServer {
+    private SSLServerSocket serverSocket;
+    private SSLSocket clientSocket;
+    private List<String> messageList = new ArrayList<String>();
+    private TLSSyslogInputStreamReaderBase syslogReader;
+
+    private TLSSyslogMessageFormat messageFormat = TLSSyslogMessageFormat.SYSLOG;
+    private int loopLen;
+
+    public MockTLSSyslogServer(int loopLen, TLSSyslogMessageFormat format, SSLServerSocket serverSocket) {
+        super(loopLen, serverSocket.getLocalPort());
+        this.messageFormat = format;
+        this.loopLen = loopLen;
+        this.serverSocket = serverSocket;
+    }
+
+    @Override
+    public void shutdown() {
+        try {
+            try {
+                this.serverSocket.close();
+            }
+            catch (Exception e) {
+
+            }
+            this.interrupt();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+    @Override
+    public void run() {
+        try {
+            waitForConnection();
+            processFrames();
+        } catch (Exception se) {
+            se.printStackTrace();
+        } finally {
+            closeSockets();
+        }
+    }
+
+    private void waitForConnection() throws IOException {
+        clientSocket =  (SSLSocket) serverSocket.accept();
+        InputStream clientSocketInputStream = clientSocket.getInputStream();
+        syslogReader = createTLSSyslogReader(clientSocketInputStream);
+    }
+
+    private TLSSyslogInputStreamReaderBase createTLSSyslogReader(InputStream inputStream) {
+        switch (messageFormat) {
+            case SYSLOG:
+                return new TLSSyslogInputStreamReader(inputStream);
+            case LEGACY_BSD:
+                return new LegacyBSDTLSSyslogInputStreamReader(inputStream);
+            default:
+                return null;
+        }
+    }
+
+    private void closeSockets() {
+        if(clientSocket != null) {
+            try {
+                clientSocket.close();
+            }
+            catch(Exception e) {}
+        }
+        if (serverSocket != null) {
+            try {
+                serverSocket.close();
+            } catch (Exception e) {
+            }
+        }
+    }
+
+    private synchronized void processFrames() throws IOException {
+        try {
+            int count = 0;
+            while (true) {
+                String message = "";
+                message = syslogReader.read();
+                messageList.add(message);
+                count++;
+                if (isEndOfMessages(count))
+                    break;
+            }
+            this.notify();
+        }
+        catch(Exception e) {
+            this.notify();
+            throw new IOException(e);
+        }
+        return;
+    }
+
+    private boolean isEndOfMessages(int count) {
+        return count == loopLen;
+    }
+
+    public List<String> getMessageList() {
+        return messageList;
+    }
+}
\ No newline at end of file

Added: logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/mock/MockUDPSyslogServer.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/mock/MockUDPSyslogServer.java?rev=1520406&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/mock/MockUDPSyslogServer.java (added)
+++ logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/mock/MockUDPSyslogServer.java Thu Sep  5 20:02:34 2013
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache license, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
+ */
+package org.apache.logging.log4j.core.net.mock;
+
+import java.net.DatagramPacket;
+import java.net.DatagramSocket;
+import java.net.SocketException;
+
+public class MockUDPSyslogServer extends MockSyslogServer {
+    private final DatagramSocket socket;
+    private boolean shutdown = false;
+    private Thread thread;
+
+    public MockUDPSyslogServer(int numberOfMessagesToReceive, int port) throws SocketException {
+        super(numberOfMessagesToReceive, port);
+        this.socket = new DatagramSocket(port);
+    }
+
+    public void shutdown() {
+        this.shutdown = true;
+        thread.interrupt();
+        socket.close();
+    }
+
+    @Override
+    public void run() {
+        this.thread = Thread.currentThread();
+        final byte[] bytes = new byte[4096];
+        final DatagramPacket packet = new DatagramPacket(bytes, bytes.length);
+        try {
+            while (!shutdown) {
+                socket.receive(packet);
+                final String str = new String(packet.getData(), 0, packet.getLength());
+                messageList.add(str);
+            }
+        } catch (final Exception ex) {
+            if (!shutdown) {
+                throw new RuntimeException(ex);
+            }
+        }
+    }
+}
\ No newline at end of file

Added: logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/ssl/KeyStoreConfigurationTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/ssl/KeyStoreConfigurationTest.java?rev=1520406&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/ssl/KeyStoreConfigurationTest.java (added)
+++ logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/ssl/KeyStoreConfigurationTest.java Thu Sep  5 20:02:34 2013
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache license, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
+ */
+package org.apache.logging.log4j.core.net.ssl;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import java.security.KeyStore;
+
+public class KeyStoreConfigurationTest {
+    @Test(expected = StoreConfigurationException.class)
+    public void loadEmptyConfiguration() throws StoreConfigurationException {
+        KeyStoreConfiguration ksc = new KeyStoreConfiguration(null, null);
+        KeyStore ks = ksc.getKeyStore();
+        Assert.assertTrue(ks == null);
+    }
+
+    @Test
+    public void loadNotEmptyConfiguration() throws StoreConfigurationException {
+        KeyStoreConfiguration ksc = new KeyStoreConfiguration(TestConstants.KEYSTORE_FILE, TestConstants.KEYSTORE_PWD);
+        KeyStore ks = ksc.getKeyStore();
+        Assert.assertTrue(ks != null);
+    }
+
+    @Test
+    public void returnTheSameKeyStoreAfterMultipleLoads() throws StoreConfigurationException {
+        KeyStoreConfiguration ksc = new KeyStoreConfiguration(TestConstants.KEYSTORE_FILE, TestConstants.KEYSTORE_PWD);
+        KeyStore ks = ksc.getKeyStore();
+        KeyStore ks2 = ksc.getKeyStore();
+        Assert.assertTrue(ks == ks2);
+    }
+
+    @Test(expected = StoreConfigurationException.class)
+    public void wrongPassword() throws StoreConfigurationException {
+        KeyStoreConfiguration ksc = new KeyStoreConfiguration(TestConstants.KEYSTORE_FILE, "wrongPassword!");
+        KeyStore ks = ksc.getKeyStore();
+        Assert.assertTrue(false);
+    }
+}

Added: logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/ssl/LegacyBSDTLSSyslogInputStreamReader.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/ssl/LegacyBSDTLSSyslogInputStreamReader.java?rev=1520406&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/ssl/LegacyBSDTLSSyslogInputStreamReader.java (added)
+++ logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/ssl/LegacyBSDTLSSyslogInputStreamReader.java Thu Sep  5 20:02:34 2013
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache license, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
+ */
+package org.apache.logging.log4j.core.net.ssl;
+
+import java.io.ByteArrayOutputStream;
+import java.io.EOFException;
+import java.io.IOException;
+import java.io.InputStream;
+
+public class LegacyBSDTLSSyslogInputStreamReader extends TLSSyslogInputStreamReaderBase {
+    private ByteArrayOutputStream buffer;
+
+    public LegacyBSDTLSSyslogInputStreamReader(InputStream inputStream) {
+        super(inputStream, TLSSyslogMessageFormat.LEGACY_BSD);
+        buffer = new ByteArrayOutputStream();
+    }
+
+    @Override
+    public String read() throws IOException {
+        String message = "";
+        try {
+            while (true) {
+                int b = inputStream.read();
+                if (b == -1)
+                    throw new EOFException("The stream has been closed or the end of stream has been reached");
+                buffer.write(b);
+                if (b == '\n')
+                    break;
+            }
+        }
+        catch (EOFException e) {
+            if (buffer.size() > 0) {
+                message = buffer.toString();
+                buffer.reset();
+                return message;
+            }
+            throw e;
+        }
+        message = buffer.toString();
+        buffer.reset();
+        return message;
+    }
+}

Added: logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/ssl/SSLConfigurationTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/ssl/SSLConfigurationTest.java?rev=1520406&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/ssl/SSLConfigurationTest.java (added)
+++ logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/ssl/SSLConfigurationTest.java Thu Sep  5 20:02:34 2013
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache license, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
+ */
+package org.apache.logging.log4j.core.net.ssl;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import javax.net.ssl.SSLSocket;
+import javax.net.ssl.SSLSocketFactory;
+import java.io.IOException;
+import java.io.OutputStream;
+
+public class SSLConfigurationTest {
+    private static final String TLS_TEST_HOST = "login.yahoo.com";
+    private static final int TLS_TEST_PORT = 443;
+
+    @Test
+    public void emptyConfigurationDoesntCauseNullSSLSocketFactory() throws SSLConfigurationException {
+        SSLConfiguration sc = SSLConfiguration.createSSLConfiguration(null, null);
+        SSLSocketFactory factory = sc.getSSLSocketFactory();
+        Assert.assertTrue(factory != null);
+    }
+
+    @Test
+    public void emptyConfigurationHasDefaultTrustStore() throws SSLConfigurationException, IOException {
+        SSLConfiguration sc = SSLConfiguration.createSSLConfiguration(null, null);
+        SSLSocketFactory factory = sc.getSSLSocketFactory();
+        SSLSocket clientSocket = (SSLSocket) factory.createSocket(TLS_TEST_HOST, TLS_TEST_PORT);
+        Assert.assertTrue(true);
+    }
+
+    @Test(expected = IOException.class)
+    public void connectionFailsWithoutValidServerCertificate() throws SSLConfigurationException, IOException {
+        TrustStoreConfiguration tsc = new TrustStoreConfiguration(TestConstants.TRUSTSTORE_FILE, null);
+        SSLConfiguration sc = SSLConfiguration.createSSLConfiguration(null, tsc);
+        SSLSocketFactory factory = sc.getSSLSocketFactory();
+        SSLSocket clientSocket = (SSLSocket) factory.createSocket(TLS_TEST_HOST, TLS_TEST_PORT);
+        OutputStream os = clientSocket.getOutputStream();
+        os.write("GET config/login_verify2?".getBytes());
+        Assert.assertTrue(false);
+    }
+
+    @Test
+    public void loadKeyStoreWithoutPassword() throws StoreConfigurationException, SSLConfigurationException {
+        KeyStoreConfiguration ksc = new KeyStoreConfiguration(TestConstants.KEYSTORE_FILE, null);
+        SSLConfiguration sslConf = SSLConfiguration.createSSLConfiguration(ksc, null);
+        SSLSocketFactory factory = sslConf.getSSLSocketFactory();
+        Assert.assertTrue(true);
+    }
+}

Added: logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/ssl/StoreConfigurationTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/ssl/StoreConfigurationTest.java?rev=1520406&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/ssl/StoreConfigurationTest.java (added)
+++ logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/ssl/StoreConfigurationTest.java Thu Sep  5 20:02:34 2013
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache license, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
+ */
+package org.apache.logging.log4j.core.net.ssl;
+
+import org.junit.Assert;
+import org.junit.Ignore;
+import org.junit.Test;
+
+@Ignore
+public class StoreConfigurationTest<T extends StoreConfiguration> {
+
+    @Test
+    public void equalsWithNotNullValues() {
+        String location = "/to/the/file.jks";
+        String password = "changeit";
+        StoreConfiguration a = new StoreConfiguration(location, password);
+        StoreConfiguration b = new StoreConfiguration(location, password);
+
+        Assert.assertTrue(a.equals(b));
+        Assert.assertTrue(b.equals(a));
+    }
+
+    @Test
+    public void equalsWithNullAndNotNullValues() {
+        String location = "/to/the/file.jks";
+        String password = "changeit";
+        StoreConfiguration a = new StoreConfiguration(location, password);
+        StoreConfiguration b = new StoreConfiguration(null, null);
+
+        Assert.assertTrue(a.equals(b));
+        Assert.assertTrue(b.equals(a));
+    }
+
+    @Test
+    public void equalsWithNullValues() {
+        StoreConfiguration a = new StoreConfiguration(null, null);
+        StoreConfiguration b = new StoreConfiguration(null, null);
+
+        Assert.assertTrue(a.equals(b));
+        Assert.assertTrue(b.equals(a));
+    }
+}

Added: logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/ssl/TLSSyslogInputStreamReader.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/ssl/TLSSyslogInputStreamReader.java?rev=1520406&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/ssl/TLSSyslogInputStreamReader.java (added)
+++ logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/ssl/TLSSyslogInputStreamReader.java Thu Sep  5 20:02:34 2013
@@ -0,0 +1,90 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache license, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
+ */
+package org.apache.logging.log4j.core.net.ssl;
+
+import java.io.ByteArrayOutputStream;
+import java.io.EOFException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Arrays;
+
+public class TLSSyslogInputStreamReader extends TLSSyslogInputStreamReaderBase {
+    private static final char SPACE = ' ';
+
+    private ByteArrayOutputStream messageBuffer;
+    private byte[] messagePartBuffer;
+    private byte[] lengthBuffer;
+    private int messagePartBufferSize = 8192;
+    private int lengthBufferSize = 8192;
+    private int position = 0;
+    private int nextMessageLength = 0;
+
+    public TLSSyslogInputStreamReader(InputStream inputStream) {
+        super(inputStream, TLSSyslogMessageFormat.SYSLOG);
+        this.messageBuffer = new ByteArrayOutputStream(messagePartBufferSize);
+        this.lengthBuffer = new byte[lengthBufferSize];
+        this.messagePartBuffer = new byte[messagePartBufferSize];
+    }
+
+    @Override
+    public String read() throws IOException {
+        readMessageLength();
+        readMessage();
+        String message =  buildMessage();
+        return message;
+    }
+
+    private void readMessageLength() throws IOException {
+        readBytesUntilNextSpace();
+        calculateNextMessageLength();
+    }
+
+    private void readMessage() throws IOException {
+        int remainder = nextMessageLength;
+        while (remainder > 0)  {
+            int bytesToRead = Math.min(remainder, messagePartBufferSize);
+            int n = inputStream.read(messagePartBuffer, 0, bytesToRead);
+            messageBuffer.write(messagePartBuffer, 0, n);
+            remainder -= n;
+        }
+    }
+
+    private String buildMessage() {
+        String message = messageBuffer.toString();
+        messageBuffer.reset();
+        return message;
+    }
+
+    private void readBytesUntilNextSpace() throws IOException {
+        for (int i = 0; i < lengthBufferSize; i++) {
+            int b = inputStream.read();
+            if (b < 0)
+                throw new EOFException("The stream has been closed or the end of stream has been reached");
+            byte currentByte = (byte)(b & 0xff);
+            if (currentByte == SPACE) {
+                position = i;
+                break;
+            }
+            lengthBuffer[i] = currentByte;
+        }
+    }
+
+    private void calculateNextMessageLength() {
+        byte[] length = Arrays.copyOfRange(lengthBuffer, 0, position);
+        nextMessageLength = new Integer(new String(length));
+    }
+}

Added: logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/ssl/TLSSyslogInputStreamReaderBase.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/ssl/TLSSyslogInputStreamReaderBase.java?rev=1520406&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/ssl/TLSSyslogInputStreamReaderBase.java (added)
+++ logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/ssl/TLSSyslogInputStreamReaderBase.java Thu Sep  5 20:02:34 2013
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache license, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
+ */
+package org.apache.logging.log4j.core.net.ssl;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+public abstract class TLSSyslogInputStreamReaderBase {
+
+    protected InputStream inputStream;
+    protected TLSSyslogMessageFormat messageFormat;
+
+    protected TLSSyslogInputStreamReaderBase(InputStream inputStream, TLSSyslogMessageFormat messageFormat) {
+        this.inputStream = inputStream;
+        this.messageFormat = messageFormat;
+    }
+
+    public String read() throws IOException {
+        throw new UnsupportedOperationException();
+    }
+}
\ No newline at end of file

Added: logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/ssl/TLSSyslogMessageFormat.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/ssl/TLSSyslogMessageFormat.java?rev=1520406&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/ssl/TLSSyslogMessageFormat.java (added)
+++ logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/ssl/TLSSyslogMessageFormat.java Thu Sep  5 20:02:34 2013
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache license, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
+ */
+package org.apache.logging.log4j.core.net.ssl;
+
+public enum TLSSyslogMessageFormat {
+    LEGACY_BSD,
+    SYSLOG
+}
+

Added: logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/ssl/TLSSyslogTestUtil.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/ssl/TLSSyslogTestUtil.java?rev=1520406&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/ssl/TLSSyslogTestUtil.java (added)
+++ logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/ssl/TLSSyslogTestUtil.java Thu Sep  5 20:02:34 2013
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache license, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
+ */
+package org.apache.logging.log4j.core.net.ssl;
+
+import java.util.ArrayList;
+import java.util.Random;
+
+public class TLSSyslogTestUtil {
+    public static final String ABC = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
+    public static final String NUMBERS = "0123456789";
+    public static final String WHITESPACES = " \t\n";
+    public static final String CHARSET = ABC + NUMBERS;
+    public static final String LEGACY_BSD_SYSLOG_CHARSET = ABC + NUMBERS + " \t";
+    public static final String SYSLOG_CHARSET = ABC + NUMBERS + WHITESPACES;
+
+    public static ArrayList<String> generateMessages(int numberOfMessages) {
+        return generateMessages(numberOfMessages, CHARSET);
+    }
+
+    public static ArrayList<String> generateMessages(int numberOfMessages, TLSSyslogMessageFormat format) {
+        switch (format) {
+            case SYSLOG:
+                return generateMessages(numberOfMessages, SYSLOG_CHARSET);
+            case LEGACY_BSD:
+                return generateMessages(numberOfMessages, LEGACY_BSD_SYSLOG_CHARSET);
+            default:
+                throw new IllegalArgumentException();
+        }
+    }
+
+    private static ArrayList<String> generateMessages(int numberOfMessages, String charSet) {
+        ArrayList<String> messageList = new ArrayList<String>(numberOfMessages);
+        for (int i = 0; i < numberOfMessages; i++) {
+            String message = createRandomMessage(charSet);
+            messageList.add(message);
+        }
+        return messageList;
+    }
+
+    private static String createRandomMessage(String charset) {
+        char[] chars = charset.toCharArray();
+        StringBuilder sb = new StringBuilder();
+        Random random = new Random();
+        for (int i = 0; i < random.nextInt(10000); i++) {
+            char c = chars[random.nextInt(chars.length)];
+            sb.append(c);
+        }
+        String output = sb.toString();
+        return output;
+    }
+
+    public static int getRandomInt(int max) {
+        Random random = new Random();
+        int n = random.nextInt(max);
+        if (n < 0)
+            return -n;
+        return n;
+    }
+}
+

Added: logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/ssl/TestConstants.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/ssl/TestConstants.java?rev=1520406&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/ssl/TestConstants.java (added)
+++ logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/ssl/TestConstants.java Thu Sep  5 20:02:34 2013
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache license, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
+ */
+package org.apache.logging.log4j.core.net.ssl;
+
+public class TestConstants {
+    public static final String PATH =  "src/test/resources/org/apache/logging/log4j/core/net/ssl/";
+    public static final String TRUSTSTORE_PATH = PATH;
+    public static final String TRUSTSTORE_FILE = TRUSTSTORE_PATH + "truststore.jks";
+    public static final String TRUSTSTORE_PWD = "changeit";
+
+    public static final String KEYSTORE_PATH = PATH;
+    public static final String KEYSTORE_FILE = KEYSTORE_PATH + "client.log4j2-keystore.jks";
+    public static final String KEYSTORE_PWD = "changeit";
+}

Added: logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/ssl/TrustStoreConfigurationTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/ssl/TrustStoreConfigurationTest.java?rev=1520406&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/ssl/TrustStoreConfigurationTest.java (added)
+++ logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/ssl/TrustStoreConfigurationTest.java Thu Sep  5 20:02:34 2013
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache license, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
+ */
+package org.apache.logging.log4j.core.net.ssl;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import java.security.KeyStore;
+
+public class TrustStoreConfigurationTest {
+    @Test(expected = StoreConfigurationException.class)
+    public void loadEmptyConfiguration() throws StoreConfigurationException {
+        TrustStoreConfiguration ksc = new TrustStoreConfiguration(null, null);
+        KeyStore ks = ksc.getTrustStore();
+        Assert.assertTrue(ks == null);
+    }
+
+    @Test
+    public void loadConfiguration() throws StoreConfigurationException {
+        TrustStoreConfiguration ksc = new TrustStoreConfiguration(TestConstants.TRUSTSTORE_FILE, TestConstants.TRUSTSTORE_PWD);
+        KeyStore ks = ksc.getTrustStore();
+        Assert.assertNotNull(ks);
+    }
+
+    @Test
+    public void returnTheSameKeyStoreAfterMultipleLoads() throws StoreConfigurationException {
+        TrustStoreConfiguration ksc = new TrustStoreConfiguration(TestConstants.TRUSTSTORE_FILE, TestConstants.TRUSTSTORE_PWD);
+        KeyStore ks = ksc.getTrustStore();
+        KeyStore ks2 = ksc.getTrustStore();
+        Assert.assertTrue(ks == ks2);
+    }
+
+    @Test(expected = StoreConfigurationException.class)
+    public void wrongPassword() throws StoreConfigurationException {
+        TrustStoreConfiguration ksc = new TrustStoreConfiguration(TestConstants.TRUSTSTORE_FILE, "wrongPassword!");
+        KeyStore ks = ksc.getTrustStore();
+        Assert.assertTrue(false);
+    }
+}

Modified: logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/pattern/ThrowablePatternConverterTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/pattern/ThrowablePatternConverterTest.java?rev=1520406&r1=1520405&r2=1520406&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/pattern/ThrowablePatternConverterTest.java (original)
+++ logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/pattern/ThrowablePatternConverterTest.java Thu Sep  5 20:02:34 2013
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache license, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
+ */
 package org.apache.logging.log4j.core.pattern;
 
 import static org.junit.Assert.assertEquals;
@@ -75,7 +91,7 @@ public class ThrowablePatternConverterTe
         final String result = sb.toString();
         assertTrue("The line numbers should be same", expectedLineNumber == Integer.parseInt(result));
     }
-    
+
     @Test
     public void testLocalizedMessage() {
         final String[] options = { "short.localizedMessage" };

Added: logging/log4j/log4j2/trunk/log4j-core/src/test/resources/org/apache/logging/log4j/core/net/ssl/README
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/test/resources/org/apache/logging/log4j/core/net/ssl/README?rev=1520406&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/test/resources/org/apache/logging/log4j/core/net/ssl/README (added)
+++ logging/log4j/log4j2/trunk/log4j-core/src/test/resources/org/apache/logging/log4j/core/net/ssl/README Thu Sep  5 20:02:34 2013
@@ -0,0 +1,13 @@
+This directory contains files to test the TLSSyslogAppender and its helpes classes. Please don't remove them.
+
+All certificates are signed with log4j2-cacert.pem, which is the root certificate (you can find help here to install it:
+http://askubuntu.com/questions/73287/how-do-i-install-a-root-certificate). The client.log4j2-keystore.jks contains the
+client private key, the corresponding certificate (client.log4j2-crt.pem) and the root CA certificate 
+(log4j2-cacert.pem). The root CA certificate is also imported into the truststore.jks.
+
+The server.log4j2-key.pem is a private key generated by OpenSSL, which can be used as a server private key. The 
+server.log4j2-crt.pem is the corresponding certificate signed with log4j2-cacert.pem.
+
+All JKS files are created with password "changeit".
+
+The syslog-ng-sample.conf file contains the relevant part of a sample syslog-ng configuration with TLS support.

Added: logging/log4j/log4j2/trunk/log4j-core/src/test/resources/org/apache/logging/log4j/core/net/ssl/client.log4j2-crt.pem
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/test/resources/org/apache/logging/log4j/core/net/ssl/client.log4j2-crt.pem?rev=1520406&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/test/resources/org/apache/logging/log4j/core/net/ssl/client.log4j2-crt.pem (added)
+++ logging/log4j/log4j2/trunk/log4j-core/src/test/resources/org/apache/logging/log4j/core/net/ssl/client.log4j2-crt.pem Thu Sep  5 20:02:34 2013
@@ -0,0 +1,32 @@
+-----BEGIN CERTIFICATE-----
+MIIFmDCCA4CgAwIBAgIBAjANBgkqhkiG9w0BAQsFADAhMQswCQYDVQQGEwJVUzES
+MBAGA1UEAxMJbG9nNGoyLWNhMB4XDTEzMDgwNzE1MDA1M1oXDTIyMDgwNTE1MDA1
+M1owJTELMAkGA1UEBhMCVVMxFjAUBgNVBAMTDWNsaWVudC5sb2c0ajIwggIiMA0G
+CSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCWTzL0JcyH78O1JBPhgAytdtauJr6a
+azQyaCSUzNqrEPQFzmcafMjaRvmHzduTnSSS6c5HwqU6nrVTOTkLdmGIiv1R60T4
+Jvhkvj2wX5SNSAn75T6C5Y9tvr6W0mPgKH0HovXMTOiwZ3rRp6FR8ivvhtVgd1/k
+cBigxVR3rGpKO4eS84MRmWRnl/X/OEakE0DyKN15M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gu8BHeF4THwpSaTS3lD6Y1
+2Jg4FOQ6/SYVoGghTBQp7+e8ROPeosNMUGrxhnjlITUyVsMPMszKBm5z4YGC25yj
+vTzz311fTMm7ylhDIk0PAQHsNz2xntBy0/NiJxVaZI3DluwcfJR0/C5ZLZ7m4VvF
+SnjNzedY1v8N/o1FD5x71bfvAJ97O46a7H80qPlTo5wxgYh0MwRle8xSJkD1JGvc
+LPeLTifSsFDJ6N3lbkjc1McclIoG49sCFFShUftwxGBw4Urfmtg/wbj8FETEqBwp
+buhxYYx+K91dwb+RDu/N1a6F0kbNwvnsH2Zi0SOmh1Otzif27ZUl++eqCxZxM7KO
+ECI3NEhlbdxaYUwXnAc0rr/OTYV+rSsq5tmXXc+0PyMSFg9PhR/nyrDOXo2rkxg4
+UVaU5TXuVvI6rIsh+sauSDKzO4/5n3GlZ3QBB+wpvdSeD+eXKMlI9Tw/i/M=
+-----END CERTIFICATE-----

Added: logging/log4j/log4j2/trunk/log4j-core/src/test/resources/org/apache/logging/log4j/core/net/ssl/client.log4j2-keystore.jks
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/test/resources/org/apache/logging/log4j/core/net/ssl/client.log4j2-keystore.jks?rev=1520406&view=auto
==============================================================================
Binary file - no diff available.

Propchange: logging/log4j/log4j2/trunk/log4j-core/src/test/resources/org/apache/logging/log4j/core/net/ssl/client.log4j2-keystore.jks
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: logging/log4j/log4j2/trunk/log4j-core/src/test/resources/org/apache/logging/log4j/core/net/ssl/log4j2-cacert.pem
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/test/resources/org/apache/logging/log4j/core/net/ssl/log4j2-cacert.pem?rev=1520406&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/test/resources/org/apache/logging/log4j/core/net/ssl/log4j2-cacert.pem (added)
+++ logging/log4j/log4j2/trunk/log4j-core/src/test/resources/org/apache/logging/log4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z
+2Nb/ZdHJEwUwUQYDVR0jBEowSIAU4omwcyI7hxhQl0Kz2Nb/ZdHJEwWhJaQjMCEx
+CzAJBgNVBAYTAlVTMRIwEAYDVQQDEwlsb2c0ajItY2GCCQCDyadCCkARxDAPBgNV
+HRMBAf8EBTADAQH/MBEGCWCGSAGG+EIBAQQEAwIBBjAJBgNVHRIEAjAAMAkGA1Ud
+EQQCMAAwDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3DQEBBQUAA4ICAQB0rkEVllwI
+ajaqyDajCKxKAl2euPixzQh3w4Hauip0QwxHwV5lrQUixQ5Qu/7gCxTQL25/K6Zw
+gwtQ+n6CESL+QTDgL34JOMXXoE+SfEGwcTlyeYKpPzs3fH5rKqzTzGeB4ZnoOzhZ
+TiHvdUXvLjIKuBEnO8Ho9YG2BnGKCCsCQXaUrf1fT3yKcz4trb8AYzOdJVI93ykH
+qaYgZGnvnPs8Nafdm8DLF3HloKsofdGjnB1UWtBBX6Rg+wCXS8/Twrc1YYEs2mrq
+tyKOekvCJvNMZjlIiBN4OPG2N5jW03N3vW2fEsgALj37sI54x7PpNODcFutDWUvJ
+UsvFofK8Ik2IreA6A6GO1kWEP6VIkYf9RePEVm6+d274AANEUzws2JAj4jKquiNf
+foaUbuXLC7NIeZ85Jaw0QtNUPiR/jR5wYNZEhWtRZBlME4bH6wYUGywUXzIfInaz
+NVIUkbyb7R1ljO461miZMxPZgnHy8MW6D2218/KQrERLDjrM/ggFTw7hv5gJWzUQ
+h0R/VblnkZZPAwNYBM8Q11mCAtt/sU5wEQA6SFJpkqAxzQS438gFYC5QMo7Lb1vp
+obY84mniOFcpCbY9O2DcXoZTXz22ixMvLu3t2rhLMe+O8RnjCZWh6ynFWa0zFb6E
+9oCOdepDTGL48lxcOEpnfNYtkn7BG/pS0g==
+-----END CERTIFICATE-----

Added: logging/log4j/log4j2/trunk/log4j-core/src/test/resources/org/apache/logging/log4j/core/net/ssl/server.log4j2-crt.pem
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/test/resources/org/apache/logging/log4j/core/net/ssl/server.log4j2-crt.pem?rev=1520406&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/test/resources/org/apache/logging/log4j/core/net/ssl/server.log4j2-crt.pem (added)
+++ logging/log4j/log4j2/trunk/log4j-core/src/test/resources/org/apache/logging/log4j/core/net/ssl/server.log4j2-crt.pem Thu Sep  5 20:02:34 2013
@@ -0,0 +1,32 @@
+-----BEGIN CERTIFICATE-----
+MIIFmDCCA4CgAwIBAgIBATANBgkqhkiG9w0BAQUFADAhMQswCQYDVQQGEwJVUzES
+MBAGA1UEAxMJbG9nNGoyLWNhMB4XDTEzMDgwNzE0NTcxMFoXDTIyMDgwNTE0NTcx
+MFowJTELMAkGA1UEBhMCVVMxFjAUBgNVBAMMDXNlcnZlci5sb2c0ajIwggIiMA0G
+CSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDJ7tnl+byEnkJSePcj9XZ6y1C3eUOo
+AsI70fgPIemUP+139VGCxa0uvYpE4tri4ZQV9zLq2VLPr9Cu5+ZBvA9ziEoeU3Rg
+vWIFN1wm+iTJy8mfNI2x/q9W5NiUqjYWZVAJhdImO+wWfKXfhE07CLY/pUrv/QiY
+EsBXQ3dWGussWu1mVS46B/ehHkNJUZCxbtwvaIZUJwBr0CPVIcv55hwAgD9pyXMn
+Mfr1ze0iIpvH3gKZEi8Qzlj8HIxjnVOCBGU6r1DhvfNGaGMkmMwclxxhK19mam2t
+AyscnJJ4HJ+uQZ6jT2CTj5xfeX5kwMy5Eb1gS0cwZrNQYSBdXI1/SNqNIsyI3uZd
+plZ00X6D9cYTtc8pnSbaCbriDnod5o3e1GgKwhbYZfG92NWR5/XEh7YVqR8gGq+v
+4I0Zd7ncGPVOkBRzQJpXxzrn+r8bbregqcbFlpR6xtSoJjsjLzl4965/BpipaT9S
+txO4NS2G5ETmCDViRsmWhNvXPkbhzigNW95p5p33tX7fryWM3kw49qG1u24R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AXSv41k5w+cmi747YUHaGvy7lqb4rfSEoGiENuicQ7g+tDvb0TvhGO8A5jsy
+kdlWKkvDeCZeG52ctwia5DuhF6KCskCq/F2XJS3qntwOEu0BV4lmmu4hxek=
+-----END CERTIFICATE-----

Added: logging/log4j/log4j2/trunk/log4j-core/src/test/resources/org/apache/logging/log4j/core/net/ssl/server.log4j2-key.pem
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/test/resources/org/apache/logging/log4j/core/net/ssl/server.log4j2-key.pem?rev=1520406&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/test/resources/org/apache/logging/log4j/core/net/ssl/server.log4j2-key.pem (added)
+++ logging/log4j/log4j2/trunk/log4j-core/src/test/resources/org/apache/logging/log4j/core/net/ssl/server.log4j2-key.pem Thu Sep  5 20:02:34 2013
@@ -0,0 +1,51 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIJKgIBAAKCAgEAye7Z5fm8hJ5CUnj3I/V2estQt3lDqALCO9H4DyHplD/td/VR
+gsWtLr2KROLa4uGUFfcy6tlSz6/QrufmQbwPc4hKHlN0YL1iBTdcJvokycvJnzSN
+sf6vVuTYlKo2FmVQCYXSJjvsFnyl34RNOwi2P6VK7/0ImBLAV0N3VhrrLFrtZlUu
+Ogf3oR5DSVGQsW7cL2iGVCcAa9Aj1SHL+eYcAIA/aclzJzH69c3tIiKbx94CmRIv
+EM5Y/ByMY51TggRlOq9Q4b3zRmhjJJjMHJccYStfZmptrQMrHJySeByfrkGeo09g
+k4+cX3l+ZMDMuRG9YEtHMGazUGEgXVyNf0jajSLMiN7mXaZWdNF+g/XGE7XPKZ0m
+2gm64g56HeaN3tRoCsIW2GXxvdjVkef1xIe2FakfIBqvr+CNGXe53Bj1TpAUc0Ca
+V8c65/q/G263oKnGxZaUesbUqCY7Iy85ePeufwaYqWk/UrcTuDUthuRE5gg1YkbJ
+loTb1z5G4c4oDVveaead97V+368ljN5MOPahtbtuEW3QtkePZx9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cCWeDSUOpHCmYOhHWrbZF5d4l9OCaihiA
+5LxmMva8Lkh8Kpr0V0jj3tDDi1G49uOFdOHjh9v+oHfZVwRdK4zXjv5hxEBwAeRr
+h7Z0QN9eLxJIrQuvm3RBurxopAFmHOffdQKCAQEA24awG89Oydyr9DBSu1oMkdWz
+mx9Kz8ppuDz/nx21CabAGh0J9yahEA8RvUqgWuLwaSMEMCJaSP+Ed9FSFhTHJMbU
+LiGV5Xm9/GD5NO3L4o0hvCKmdRKmpoUD5t5IIx6cKsiW4/f3sQW+kTVlr/M488kb
+Oc5VwnMPqNaP1dtbXhe9uJi6InRubMytkY3/xwPX7GjqrfFMOYyUGCkk7wt11d1h
+4lm4dVfhPtlSzZnjAV1+YGwlaJzThFbCEpbg3WRXHu0yDKVQUPTijAC9XFUE1Og8
+FuuRrp2B+lOAhVi/8OiDBwUZTZ/pSWysOzY20fWq2rKEqW19ov8hHN/NFDGhSw==
+-----END RSA PRIVATE KEY-----

Added: logging/log4j/log4j2/trunk/log4j-core/src/test/resources/org/apache/logging/log4j/core/net/ssl/syslog-ng-sample.conf
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/test/resources/org/apache/logging/log4j/core/net/ssl/syslog-ng-sample.conf?rev=1520406&view=auto
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/test/resources/org/apache/logging/log4j/core/net/ssl/syslog-ng-sample.conf (added)
+++ logging/log4j/log4j2/trunk/log4j-core/src/test/resources/org/apache/logging/log4j/core/net/ssl/syslog-ng-sample.conf Thu Sep  5 20:02:34 2013
@@ -0,0 +1,33 @@
+source demo_tls_source {
+    tcp(ip(0.0.0.0) port(6515) 
+    tls( 
+        ca_dir("/etc/ssl/certs")
+        key_file("/home/btibi/ca/log4j2/server.log4j2-key.pem") 
+        cert_file("/home/btibi/ca/log4j2/server.log4j2-crt.pem")
+    )
+    );
+};
+
+source demo_tls_syslog_source {                    
+    syslog(ip(0.0.0.0) port(6514)
+    transport("tls")
+    tls(
+        ca_dir("/etc/ssl/certs")
+        key_file("/home/btibi/ca/log4j2/server.log4j2-key.pem") 
+        cert_file("/home/btibi/ca/log4j2/server.log4j2-crt.pem")
+    )
+    );
+};
+
+destination d_structuredOverTLS { file("/var/log/structuredOverTLS"); };
+destination d_legacyOverTLS { file("/var/log/legacyOverTLS"); };
+
+log {
+    source(demo_tls_source);
+    destination(d_legacyOverTLS);
+};
+
+log {
+    source(demo_tls_syslog_source);
+    destination(d_structuredOverTLS);
+};

Added: logging/log4j/log4j2/trunk/log4j-core/src/test/resources/org/apache/logging/log4j/core/net/ssl/truststore.jks
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/test/resources/org/apache/logging/log4j/core/net/ssl/truststore.jks?rev=1520406&view=auto
==============================================================================
Binary file - no diff available.

Propchange: logging/log4j/log4j2/trunk/log4j-core/src/test/resources/org/apache/logging/log4j/core/net/ssl/truststore.jks
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Modified: logging/log4j/log4j2/trunk/log4j-flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumeAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumeAppender.java?rev=1520406&r1=1520405&r2=1520406&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumeAppender.java (original)
+++ logging/log4j/log4j2/trunk/log4j-flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumeAppender.java Thu Sep  5 20:02:34 2013
@@ -215,7 +215,7 @@ public final class FlumeAppender extends
 
         if (layout == null) {
             layout = RFC5424Layout.createLayout(null, null, null, "True", null, mdcPrefix, eventPrefix,
-                    null, null, null, excludes, includes, required, null, null, null, null);
+                    null, null, null, null, excludes, includes, required, null, null, null, null);
         }
 
         if (name == null) {



Mime
View raw message