trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jpe...@apache.org
Subject git commit: Add SSL cert generation test script
Date Tue, 16 Jul 2013 17:18:30 GMT
Updated Branches:
  refs/heads/master e9a528e90 -> 48ba6c208


Add SSL cert generation test script


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

Branch: refs/heads/master
Commit: 48ba6c20854f50e03db627ff26cceede0b8c22c9
Parents: e9a528e
Author: James Peach <jpeach@apache.org>
Authored: Tue Jul 16 10:18:14 2013 -0700
Committer: James Peach <jpeach@apache.org>
Committed: Tue Jul 16 10:18:19 2013 -0700

----------------------------------------------------------------------
 contrib/make-ssl-multicert | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/48ba6c20/contrib/make-ssl-multicert
----------------------------------------------------------------------
diff --git a/contrib/make-ssl-multicert b/contrib/make-ssl-multicert
new file mode 100755
index 0000000..0a81ef4
--- /dev/null
+++ b/contrib/make-ssl-multicert
@@ -0,0 +1,31 @@
+#! /usr/bin/env bash
+
+# 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
+
+# make-ssl-multicert: generate arbitrary numbers of SSL certificates
+# Generate up to $COUNT SSL certificates and the corresponding ssl_multicert.config
+
+OPENSSL=${OPENSSL:-openssl}
+COUNT=${COUNT:-100001}
+
+for ((i=0 ; i < $COUNT ; i++)); do
+  $OPENSSL genrsa -out test$i.key 2048
+  $OPENSSL req -new -key test$i.key -out test$i.csr -subj /C=US/ST=CA/L=Norm/O=TrafficServer/OU=Test/CN=test${i}.com
+  $OPENSSL x509 -req -days 365 -in test$i.csr -signkey test$i.key -out test$i.crt
+  cat test$i.crt test$i.key > test$i.pem
+  rm -rf test$i.csr test$i.key test$i.crt
+
+  echo ssl_cert_name=test$i.pem >> ssl_multicert.config
+done


Mime
View raw message