Skip to content

Commit b4dcbf7

Browse files
cederomxiaoxiang781216
authored andcommitted
ssltestgen: Add script to generate local test ssl key+crt.
* This script genrates local testing SSL key and certificate using openssl. * Enter key password (used to sign crt and launch srv) and cert details. * Then: `bundle exec jekyll serve --ssl-cert server.crt --ssl-key server.key`. Signed-off-by: Tomasz 'CeDeROM' CEDRO <tomek@cedro.info>
1 parent 2484e21 commit b4dcbf7

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

ssltestgen.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/bin/sh
2+
#
3+
# Licensed to the Apache Software Foundation (ASF) under one or more
4+
# contributor license agreements. See the NOTICE file distributed with
5+
# this work for additional information regarding copyright ownership.
6+
# The ASF licenses this file to you under the Apache License, Version 2.0
7+
# (the "License"); you may not use this file except in compliance with
8+
# the License. You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#
18+
# This script genrates local testing SSL key and certificate using openssl.
19+
# Enter key password (used to sign crt and launch srv) and cert details.
20+
# Then: bundle exec jekyll serve --ssl-cert server.crt --ssl-key server.key
21+
22+
set -e
23+
24+
openssl genrsa -des3 -out server.key 1024
25+
openssl req -new -key server.key -out server.csr
26+
openssl x509 -req -days 3650 -in server.csr -signkey server.key -out server.crt

0 commit comments

Comments
 (0)