drill-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From par...@apache.org
Subject [06/13] drill git commit: DRILL-5431: SSL Support (Java) - Add test certificates, keys, keystore, and truststore.
Date Thu, 12 Oct 2017 18:28:18 GMT
DRILL-5431: SSL Support (Java) - Add test certificates, keys, keystore, and truststore.


Project: http://git-wip-us.apache.org/repos/asf/drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/ebddd61a
Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/ebddd61a
Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/ebddd61a

Branch: refs/heads/master
Commit: ebddd61a2d8ebc93448129f3129e41f45e27fe7c
Parents: 58b7be2
Author: Parth Chandra <parthc@apache.org>
Authored: Tue Jul 25 09:21:02 2017 -0700
Committer: Parth Chandra <parthc@apache.org>
Committed: Wed Oct 11 19:26:13 2017 -0700

----------------------------------------------------------------------
 contrib/native/client/readme.ssl                |  58 +++++++++++++++++++
 contrib/native/client/test/ssl/dh512.pem        |   4 ++
 .../native/client/test/ssl/drillTestCert.p12    | Bin 0 -> 1741 bytes
 .../native/client/test/ssl/drillTestCert.pem    |  18 ++++++
 .../native/client/test/ssl/drillTestServer.csr  |  13 +++++
 .../client/test/ssl/drillTestServerKey.pem      |  18 ++++++
 .../client/test/ssl/drillTestServerKey.safe.pem |  18 ++++++
 .../test/ssl/drillTestServerKeyNoPass.pem       |  15 +++++
 .../src/test/resources/ssl/emptykeystore.ks     | Bin 0 -> 32 bytes
 .../src/test/resources/ssl/emptytruststore.ks   | Bin 0 -> 32 bytes
 .../src/test/resources/ssl/keystore.ks          | Bin 0 -> 1492 bytes
 .../src/test/resources/ssl/nopasskeystore.ks    | Bin 0 -> 1500 bytes
 .../src/test/resources/ssl/truststore.ks        | Bin 0 -> 790 bytes
 .../src/test/resources/ssl/unknownkeystore.ks   | Bin 0 -> 2244 bytes
 pom.xml                                         |   1 +
 15 files changed, 145 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/ebddd61a/contrib/native/client/readme.ssl
----------------------------------------------------------------------
diff --git a/contrib/native/client/readme.ssl b/contrib/native/client/readme.ssl
new file mode 100644
index 0000000..86d46fc
--- /dev/null
+++ b/contrib/native/client/readme.ssl
@@ -0,0 +1,58 @@
+/*
+ * 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.
+ */
+
+Installing OpenSSL - 
+    On Mac: 
+        brew install openssl
+    On Linux :
+
+Set up the certificate
+    Generate a private key
+
+        openssl genrsa -des3 -out drillTestServerKey.pem 1024
+
+    Generate Certificate signing request
+
+        openssl req -new -key drillTestServerKey.pem -out drillTestServer.csr
+
+    Sign certificate with private key
+
+        openssl x509 -req -days 3650 -in drillTestServer.csr -signkey drillTestServerKey.pem
-out drillTestCert.pem
+
+    Remove password requirement (needed for example)
+
+        cp drillTestServerKey.pem drillTestServerKey.safe.pem
+        openssl rsa -in drillTestServerKey.safe.pem -out drillTestServerKey.pem
+
+    Generate dhparam file
+
+        openssl dhparam -out dh512.pem 512
+
+    [For use in JAVA environments] Export to pkcs12 format
+
+        openssl pkcs12 -export -out drillTestCert.p12 -inkey drillTestServerKey.pem -in drillTestCert.pem

+
+    This will provide :
+        drillTestServerKey.pem - Server private key
+        drillTestCert.pem - Client, Certificate Chain File
+        dh512.pem - Diffie-Hellman parameters
+
+Running CMake 
+    On MacOs
+        Run cmake from the build directory using: 
+            cmake -G Xcode -DOPENSSL_ROOT_DIR="/usr/local/opt/openssl" -DCMAKE_BUILD_TYPE=Debug
..

http://git-wip-us.apache.org/repos/asf/drill/blob/ebddd61a/contrib/native/client/test/ssl/dh512.pem
----------------------------------------------------------------------
diff --git a/contrib/native/client/test/ssl/dh512.pem b/contrib/native/client/test/ssl/dh512.pem
new file mode 100644
index 0000000..b9e55b6
--- /dev/null
+++ b/contrib/native/client/test/ssl/dh512.pem
@@ -0,0 +1,4 @@
+-----BEGIN DH PARAMETERS-----
+MEYCQQDQE71rvWo6EEAEsDF0+1WftdGNbCh7UITCQQStjPUnzFBjg+QydMD91fnE
+aCZGUmXpEERnsDxH4QKkJcIJgwf7AgEC
+-----END DH PARAMETERS-----

http://git-wip-us.apache.org/repos/asf/drill/blob/ebddd61a/contrib/native/client/test/ssl/drillTestCert.p12
----------------------------------------------------------------------
diff --git a/contrib/native/client/test/ssl/drillTestCert.p12 b/contrib/native/client/test/ssl/drillTestCert.p12
new file mode 100644
index 0000000..bc3c09e
Binary files /dev/null and b/contrib/native/client/test/ssl/drillTestCert.p12 differ

http://git-wip-us.apache.org/repos/asf/drill/blob/ebddd61a/contrib/native/client/test/ssl/drillTestCert.pem
----------------------------------------------------------------------
diff --git a/contrib/native/client/test/ssl/drillTestCert.pem b/contrib/native/client/test/ssl/drillTestCert.pem
new file mode 100644
index 0000000..d43d91e
--- /dev/null
+++ b/contrib/native/client/test/ssl/drillTestCert.pem
@@ -0,0 +1,18 @@
+-----BEGIN CERTIFICATE-----
+MIIC0TCCAjoCCQDqneo+oxmMTzANBgkqhkiG9w0BAQsFADCBrDELMAkGA1UEBhMC
+VVMxCzAJBgNVBAgMAk1EMRQwEgYDVQQHDAtGb3Jlc3QgSGlsbDEjMCEGA1UECgwa
+QXBhY2hlIFNvZnR3YXJlIEZvdW5kYXRpb24xFTATBgNVBAsMDEFwYWNoZSBEcmls
+bDEZMBcGA1UEAwwQZHJpbGwuYXBhY2hlLm9yZzEjMCEGCSqGSIb3DQEJARYUZGV2
+QGRyaWxsLmFwYWNoZS5vcmcwHhcNMTcwNjIxMDA0NDQ3WhcNMjcwNjE5MDA0NDQ3
+WjCBrDELMAkGA1UEBhMCVVMxCzAJBgNVBAgMAk1EMRQwEgYDVQQHDAtGb3Jlc3Qg
+SGlsbDEjMCEGA1UECgwaQXBhY2hlIFNvZnR3YXJlIEZvdW5kYXRpb24xFTATBgNV
+BAsMDEFwYWNoZSBEcmlsbDEZMBcGA1UEAwwQZHJpbGwuYXBhY2hlLm9yZzEjMCEG
+CSqGSIb3DQEJARYUZGV2QGRyaWxsLmFwYWNoZS5vcmcwgZ8wDQYJKoZIhvcNAQEB
+BQADgY0AMIGJAoGBAMKeQ+48kz7dB0nxcG2eZpglWzwtxVMCBNpmi8nCdm6VUGSi
+3HBh96NRp1d39DFCxUgDchB2l/oHwx/5ds1jmyC72Lh4y89djiwXRd3sj7ZunEuP
+tYcSel7FoSpKoQVAs6c2SirVKLDISR2QnN5Sadf48/owrX2NF1UMG7jLjc4XAgMB
+AAEwDQYJKoZIhvcNAQELBQADgYEAvAHmxkg27iwykaDyOs1PTMdW+Ktq9L5+hu3M
+xdXVCXLaSGsujmaMjOEb5tUO6uyXwylRVYCBuRnHGm6KuBbP/DqamkdqavFWF6JC
+ADiplVsiTaCRleDei/4+FyMEXg7AS6QfjROrp6RevIBpZCB6PW4f3vnWjpBvkAcw
+aC1So14=
+-----END CERTIFICATE-----

http://git-wip-us.apache.org/repos/asf/drill/blob/ebddd61a/contrib/native/client/test/ssl/drillTestServer.csr
----------------------------------------------------------------------
diff --git a/contrib/native/client/test/ssl/drillTestServer.csr b/contrib/native/client/test/ssl/drillTestServer.csr
new file mode 100644
index 0000000..4c2a6bd
--- /dev/null
+++ b/contrib/native/client/test/ssl/drillTestServer.csr
@@ -0,0 +1,13 @@
+-----BEGIN CERTIFICATE REQUEST-----
+MIICBjCCAW8CAQAwgawxCzAJBgNVBAYTAlVTMQswCQYDVQQIDAJNRDEUMBIGA1UE
+BwwLRm9yZXN0IEhpbGwxIzAhBgNVBAoMGkFwYWNoZSBTb2Z0d2FyZSBGb3VuZGF0
+aW9uMRUwEwYDVQQLDAxBcGFjaGUgRHJpbGwxGTAXBgNVBAMMEGRyaWxsLmFwYWNo
+ZS5vcmcxIzAhBgkqhkiG9w0BCQEWFGRldkBkcmlsbC5hcGFjaGUub3JnMIGfMA0G
+CSqGSIb3DQEBAQUAA4GNADCBiQKBgQDCnkPuPJM+3QdJ8XBtnmaYJVs8LcVTAgTa
+ZovJwnZulVBkotxwYfejUadXd/QxQsVIA3IQdpf6B8Mf+XbNY5sgu9i4eMvPXY4s
+F0Xd7I+2bpxLj7WHEnpexaEqSqEFQLOnNkoq1SiwyEkdkJzeUmnX+PP6MK19jRdV
+DBu4y43OFwIDAQABoBkwFwYJKoZIhvcNAQkHMQoMCGRyaWxsMTIzMA0GCSqGSIb3
+DQEBCwUAA4GBAFuGGehqJ7H1QMYhC+5XOTq3cTAcOzR+Z3fAEYlt8l799QykAy1c
+HwCVgE3rt2oRYZ/klUh71NFj2KZXrpGWHpG+ipl46fKcYtAm259wLXgZEEtSGoPW
+KcX61QT2F31pPCoyuq/enB520uqwpTszHgXtIgwQ/Jjl2iD8icO0MPs2
+-----END CERTIFICATE REQUEST-----

http://git-wip-us.apache.org/repos/asf/drill/blob/ebddd61a/contrib/native/client/test/ssl/drillTestServerKey.pem
----------------------------------------------------------------------
diff --git a/contrib/native/client/test/ssl/drillTestServerKey.pem b/contrib/native/client/test/ssl/drillTestServerKey.pem
new file mode 100644
index 0000000..6024029
--- /dev/null
+++ b/contrib/native/client/test/ssl/drillTestServerKey.pem
@@ -0,0 +1,18 @@
+-----BEGIN RSA PRIVATE KEY-----
+Proc-Type: 4,ENCRYPTED
+DEK-Info: DES-EDE3-CBC,5F70A92B8092B3B3
+
+2b7jWSVTAUkcBDeu1pS2U1cWukWDjJ+AeKA48w3mYOocyiZ0LmB+nXXtisZBgEPp
+xfSJBuE19nocaoX3NknhJIMkVrz0JyfeN+pWqhZYbY/i1vpTbS4J9/uuazwwM2P7
+9/6GR7Y/tx/NSYL/0Bp+Ng+kcCt0nngWMd198/MI0iz8gfywQZXgC2OoS5HXh21N
+NYMXUwXGCGHkaFZHFyTYNZ+e0dZ0xV1TeZRNpXL1iQ4eCHhwSyz5sKgPRnrrX2Z/
+XfzLPqjS1Wxm89sN2HP1X7j9rA/FSrHTejXDgdxad4XQkY6S+uc6QoGDi2KynKyD
+cI2VtGnjRMf8aCohBTw6ynXyX02sooCEbR0sK/QLVuSAkuMhX276BLjbd1OBL/5w
+dXq1BL2LLjU+wB9l6CfV+i7lJt2gvzAHrh1S3y9xVPZ6P4qQ5lUgp+efn3TMbfOS
+XgBVp0D8VVwoL9b+64BJQjlNIXzqvPhJ3TdquGF8zkordP6LKo6qpYWjVH89s1/x
+4JdylIrkRHRTkOo9QVMcaIZGMm2TXeqYEWcol8f6NEvpIQCl2UAk5TlvqqI5VKn4
+qAEVi1JDg9CUFJfx/xKsda/SfigESvkETqY3oe3pWf48w7OyXbwBTvJ3Cq42SHY8
+Wk0EvDikiULTMoAnHn1omXlDe/UcJvdkhDxbQqzq/e6Pwp0RvfgQMug7btLLesI/
+Qk0xeP1nT1Dsg0+0UmJ8kJevPRlqqA4hCr5mmT633P1iDf8P/Vl76edqW29U/jKz
+UR1sZC5f17sTNN1pbSIp9AQySZTQCmNQUO/4CWeJglgXG55CgI0ZWQ==
+-----END RSA PRIVATE KEY-----

http://git-wip-us.apache.org/repos/asf/drill/blob/ebddd61a/contrib/native/client/test/ssl/drillTestServerKey.safe.pem
----------------------------------------------------------------------
diff --git a/contrib/native/client/test/ssl/drillTestServerKey.safe.pem b/contrib/native/client/test/ssl/drillTestServerKey.safe.pem
new file mode 100644
index 0000000..6024029
--- /dev/null
+++ b/contrib/native/client/test/ssl/drillTestServerKey.safe.pem
@@ -0,0 +1,18 @@
+-----BEGIN RSA PRIVATE KEY-----
+Proc-Type: 4,ENCRYPTED
+DEK-Info: DES-EDE3-CBC,5F70A92B8092B3B3
+
+2b7jWSVTAUkcBDeu1pS2U1cWukWDjJ+AeKA48w3mYOocyiZ0LmB+nXXtisZBgEPp
+xfSJBuE19nocaoX3NknhJIMkVrz0JyfeN+pWqhZYbY/i1vpTbS4J9/uuazwwM2P7
+9/6GR7Y/tx/NSYL/0Bp+Ng+kcCt0nngWMd198/MI0iz8gfywQZXgC2OoS5HXh21N
+NYMXUwXGCGHkaFZHFyTYNZ+e0dZ0xV1TeZRNpXL1iQ4eCHhwSyz5sKgPRnrrX2Z/
+XfzLPqjS1Wxm89sN2HP1X7j9rA/FSrHTejXDgdxad4XQkY6S+uc6QoGDi2KynKyD
+cI2VtGnjRMf8aCohBTw6ynXyX02sooCEbR0sK/QLVuSAkuMhX276BLjbd1OBL/5w
+dXq1BL2LLjU+wB9l6CfV+i7lJt2gvzAHrh1S3y9xVPZ6P4qQ5lUgp+efn3TMbfOS
+XgBVp0D8VVwoL9b+64BJQjlNIXzqvPhJ3TdquGF8zkordP6LKo6qpYWjVH89s1/x
+4JdylIrkRHRTkOo9QVMcaIZGMm2TXeqYEWcol8f6NEvpIQCl2UAk5TlvqqI5VKn4
+qAEVi1JDg9CUFJfx/xKsda/SfigESvkETqY3oe3pWf48w7OyXbwBTvJ3Cq42SHY8
+Wk0EvDikiULTMoAnHn1omXlDe/UcJvdkhDxbQqzq/e6Pwp0RvfgQMug7btLLesI/
+Qk0xeP1nT1Dsg0+0UmJ8kJevPRlqqA4hCr5mmT633P1iDf8P/Vl76edqW29U/jKz
+UR1sZC5f17sTNN1pbSIp9AQySZTQCmNQUO/4CWeJglgXG55CgI0ZWQ==
+-----END RSA PRIVATE KEY-----

http://git-wip-us.apache.org/repos/asf/drill/blob/ebddd61a/contrib/native/client/test/ssl/drillTestServerKeyNoPass.pem
----------------------------------------------------------------------
diff --git a/contrib/native/client/test/ssl/drillTestServerKeyNoPass.pem b/contrib/native/client/test/ssl/drillTestServerKeyNoPass.pem
new file mode 100644
index 0000000..33d0e15
--- /dev/null
+++ b/contrib/native/client/test/ssl/drillTestServerKeyNoPass.pem
@@ -0,0 +1,15 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIICXwIBAAKBgQDCnkPuPJM+3QdJ8XBtnmaYJVs8LcVTAgTaZovJwnZulVBkotxw
+YfejUadXd/QxQsVIA3IQdpf6B8Mf+XbNY5sgu9i4eMvPXY4sF0Xd7I+2bpxLj7WH
+EnpexaEqSqEFQLOnNkoq1SiwyEkdkJzeUmnX+PP6MK19jRdVDBu4y43OFwIDAQAB
+AoGBAJRXD84qC83RqTmaNyjGoMp9RtJSzOHdWxehLBGIEL9vPgzG+iEK+zdYCKYp
+/04A5+BhB/M2gdaJThg0DHK25kiycUXuY+eJq1u3yancBT5iBGls+C9Us/Mhh52j
+L8nffgn2R/+mA1ZYu6guXQpzbpkFJKlF/f55AC/PZaB4iAMhAkEA86uXnVovtVJs
+JmresHTub1sYwvmB2/iYRfF7tfJgoDunmz0quXuImNNQv4XA9cYsJFePj8J+paCy
+eyfi4q/XMQJBAMx3RbTURYoYSgc+a5clfsMZwr0QlAwaTmF/TDX/v4U7FSIlc4d4
+zMyeJz/KU0xTqQYAIMGRGVKW1yDkF8NCN8cCQQDWR29s0IJj0beJkTGDu1ByXInJ
+6+BmsJY368P+nMacIdmiioen1RqqSioYQmcNutfWnamBomf8/vP1mX3MGxYBAkEA
+vFh6e7K2RBlPyBB154uAk5QdUS/+UI/C+AjdWTi3YbElLIk3POnILgzZtudXiA3g
+u0hO5EAXBX8xuHikcxeCbQJBAMxxUS4WBXu8AYeZfaiRWUYMRCzX4t1x0sUxtwZg
+XVIzfi4YCg03YJmD+Axka0M27UTkVZQp5kbBJQwycD8dCmM=
+-----END RSA PRIVATE KEY-----

http://git-wip-us.apache.org/repos/asf/drill/blob/ebddd61a/exec/java-exec/src/test/resources/ssl/emptykeystore.ks
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/ssl/emptykeystore.ks b/exec/java-exec/src/test/resources/ssl/emptykeystore.ks
new file mode 100644
index 0000000..c8b42bd
Binary files /dev/null and b/exec/java-exec/src/test/resources/ssl/emptykeystore.ks differ

http://git-wip-us.apache.org/repos/asf/drill/blob/ebddd61a/exec/java-exec/src/test/resources/ssl/emptytruststore.ks
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/ssl/emptytruststore.ks b/exec/java-exec/src/test/resources/ssl/emptytruststore.ks
new file mode 100644
index 0000000..c8b42bd
Binary files /dev/null and b/exec/java-exec/src/test/resources/ssl/emptytruststore.ks differ

http://git-wip-us.apache.org/repos/asf/drill/blob/ebddd61a/exec/java-exec/src/test/resources/ssl/keystore.ks
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/ssl/keystore.ks b/exec/java-exec/src/test/resources/ssl/keystore.ks
new file mode 100644
index 0000000..3a40002
Binary files /dev/null and b/exec/java-exec/src/test/resources/ssl/keystore.ks differ

http://git-wip-us.apache.org/repos/asf/drill/blob/ebddd61a/exec/java-exec/src/test/resources/ssl/nopasskeystore.ks
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/ssl/nopasskeystore.ks b/exec/java-exec/src/test/resources/ssl/nopasskeystore.ks
new file mode 100644
index 0000000..98dc5cb
Binary files /dev/null and b/exec/java-exec/src/test/resources/ssl/nopasskeystore.ks differ

http://git-wip-us.apache.org/repos/asf/drill/blob/ebddd61a/exec/java-exec/src/test/resources/ssl/truststore.ks
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/ssl/truststore.ks b/exec/java-exec/src/test/resources/ssl/truststore.ks
new file mode 100644
index 0000000..e052c7f
Binary files /dev/null and b/exec/java-exec/src/test/resources/ssl/truststore.ks differ

http://git-wip-us.apache.org/repos/asf/drill/blob/ebddd61a/exec/java-exec/src/test/resources/ssl/unknownkeystore.ks
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/ssl/unknownkeystore.ks b/exec/java-exec/src/test/resources/ssl/unknownkeystore.ks
new file mode 100644
index 0000000..6e1508a
Binary files /dev/null and b/exec/java-exec/src/test/resources/ssl/unknownkeystore.ks differ

http://git-wip-us.apache.org/repos/asf/drill/blob/ebddd61a/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 4f7c2e2..532fe51 100644
--- a/pom.xml
+++ b/pom.xml
@@ -228,6 +228,7 @@
             <exclude>**/*.linux</exclude>
             <exclude>**/client/build/**</exclude>
             <exclude>**/cmake_install.cmake</exclude>
+            <exclude>**/ssl/*.csr</exclude>
             <exclude>**/*.tbl</exclude>
             <exclude>**/*.httpd</exclude>
             <exclude>**/*.autotools</exclude>


Mime
View raw message