File: run_openssl_server.sh

package info (click to toggle)
golang-github-google-certificate-transparency 0.0~git20160709.0.0f6e3d1~ds1-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster
  • size: 5,676 kB
  • sloc: cpp: 35,278; python: 11,838; java: 1,911; sh: 1,885; makefile: 950; xml: 520; ansic: 225
file content (20 lines) | stat: -rwxr-xr-x 474 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/env bash

CERT_DIR=$1
CT_KEY=$2
SERVER=${3:-"127.0.0.1:8888"}

. generate_certs.sh

if [ ! -e $CERT_DIR/ca-database ]
then
  echo "Initialise CA"
  ca_setup $CERT_DIR ca false
fi

make_cert $CERT_DIR test ca $SERVER false $CT_KEY

../cpp/client/ct extension_data --sct_token=$CERT_DIR/test-cert.proof \
    --tls_extension_data_out=/tmp/xx.pem

$OPENSSLDIR/apps/openssl s_server -serverinfo /tmp/xx.pem -cert /tmp/ct-ca/test-cert.pem -key /tmp/ct-ca/test-key.pem