You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by ro...@apache.org on 2014/02/22 20:10:17 UTC
git commit: THRIFT-2325 SSL-test-certificates.patch Java test suite
use keys and certs from test/keys/
Repository: thrift
Updated Branches:
refs/heads/master 7e10329f7 -> 48555c5d1
THRIFT-2325 SSL-test-certificates.patch
Java test suite use keys and certs from test/keys/
Patch: Roger Meier
Project: http://git-wip-us.apache.org/repos/asf/thrift/repo
Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/48555c5d
Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/48555c5d
Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/48555c5d
Branch: refs/heads/master
Commit: 48555c5d1fd202088f70a04084b73cab9ee41648
Parents: 7e10329
Author: Roger Meier <ro...@apache.org>
Authored: Sat Feb 22 20:05:21 2014 +0100
Committer: Roger Meier <ro...@apache.org>
Committed: Sat Feb 22 20:05:21 2014 +0100
----------------------------------------------------------------------
lib/java/test/.keystore | Bin 1414 -> 2427 bytes
lib/java/test/.truststore | Bin 708 -> 1143 bytes
test/keys/README.md | 30 ++++++++++++++++++++++++++++++
test/keys/server.p12 | Bin 0 -> 2677 bytes
4 files changed, 30 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/thrift/blob/48555c5d/lib/java/test/.keystore
----------------------------------------------------------------------
diff --git a/lib/java/test/.keystore b/lib/java/test/.keystore
index 0c85111..bfc058c 100644
Binary files a/lib/java/test/.keystore and b/lib/java/test/.keystore differ
http://git-wip-us.apache.org/repos/asf/thrift/blob/48555c5d/lib/java/test/.truststore
----------------------------------------------------------------------
diff --git a/lib/java/test/.truststore b/lib/java/test/.truststore
index c24b4a2..36f3ab6 100644
Binary files a/lib/java/test/.truststore and b/lib/java/test/.truststore differ
http://git-wip-us.apache.org/repos/asf/thrift/blob/48555c5d/test/keys/README.md
----------------------------------------------------------------------
diff --git a/test/keys/README.md b/test/keys/README.md
index fa1684e..d4bb5a3 100755
--- a/test/keys/README.md
+++ b/test/keys/README.md
@@ -26,6 +26,10 @@ we use the following parameters for test key and certificate creation
openssl x509 -in server.crt -text > CA.pem
cat server.crt server.key > server.pem
+Export password is **thrift**
+
+ openssl pkcs12 -export -clcerts -in server.crt -inkey server.key -out server.p12
+
### create client key and certificate
openssl genrsa -out client.key
@@ -45,3 +49,29 @@ export certificate in PKCS12 format
export certificate in PEM format for OpenSSL usage
openssl pkcs12 -in client.p12 -out client.pem -clcerts
+
+
+## Java key and certificate import
+Java Test Environment uses key and trust store password **thrift**
+
+list keystore entries
+
+ keytool -list -storepass thrift -keystore ../../lib/java/test/.keystore
+
+list truststore entries
+
+ keytool -list -storepass thrift -keystore ../../lib/java/test/.truststore
+
+import certificate into truststore
+
+ keytool -importcert -storepass thrift -keystore ../../lib/java/test/.truststore -alias ssltest --file server.crt
+
+import key into keystore
+
+ keytool -importkeystore -storepass thrift -keystore ../../lib/java/test/.keystore -srcstoretype pkcs12 -srckeystore server.p12
+
+# Test SSL server and clients
+
+ openssl s_client -connect localhost:9090
+ openssl s_server -accept 9090 -www
+
http://git-wip-us.apache.org/repos/asf/thrift/blob/48555c5d/test/keys/server.p12
----------------------------------------------------------------------
diff --git a/test/keys/server.p12 b/test/keys/server.p12
new file mode 100644
index 0000000..65fc21a
Binary files /dev/null and b/test/keys/server.p12 differ