Sha256: d8a61be28407ae545bf05b72fc67ec8534db4de0938cd54dad9b3b5710654153

Contents?: true

Size: 1.26 KB

Versions: 97

Compression:

Stored size: 1.26 KB

Contents

#!/bin/sh
set -e

if [ -d "generated" ] ; then
    echo >&2 "error: 'generated' directory already exists.  Delete it first."
    exit 1
fi

mkdir generated

# Generate the CA private key and certificate
openssl req -batch -subj '/CN=INSECURE Test Certificate Authority' -newkey rsa:1024 -new -x509 -days 999999 -keyout generated/ca.key -nodes -out generated/ca.crt

# Create symlinks for ssl_ca_path
c_rehash generated

# Generate the server private key and self-signed certificate
openssl req -batch -subj '/CN=localhost' -newkey rsa:1024 -new -x509 -days 999999 -keyout generated/server.key -nodes -out generated/selfsigned.crt

# Generate certificate signing request with bogus hostname
openssl req -batch -subj '/CN=bogo' -new -days 999999 -key generated/server.key -nodes -out generated/bogushost.csr

# Sign the certificate requests
openssl x509 -CA generated/ca.crt -CAkey generated/ca.key -set_serial 1 -in generated/selfsigned.crt -out generated/server.crt -clrext -extfile openssl-exts.cnf -extensions cert -days 999999
openssl x509 -req -CA generated/ca.crt -CAkey generated/ca.key -set_serial 1 -in generated/bogushost.csr -out generated/bogushost.crt -clrext -extfile openssl-exts.cnf -extensions cert -days 999999

# Remove certificate signing requests
rm -f generated/*.csr

Version data entries

97 entries across 95 versions & 13 rubygems

Version Path
yoyle439587298-0.13.0 spec/fixtures/ssl/generate.sh
plyom_user-0.3.1 vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/spec/fixtures/ssl/generate.sh
plyom_user-0.3.0 vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/spec/fixtures/ssl/generate.sh
plyom_user-0.2.9 vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/spec/fixtures/ssl/generate.sh
plyom_user-0.2.8 vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/spec/fixtures/ssl/generate.sh
httparty-0.13.0 spec/fixtures/ssl/generate.sh
plyom_user-0.2.7 vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/spec/fixtures/ssl/generate.sh
plyom_user-0.2.6 vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/spec/fixtures/ssl/generate.sh
plyom_user-0.2.5 vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/spec/fixtures/ssl/generate.sh
plyom_user-0.2.4 vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/spec/fixtures/ssl/generate.sh
plyom_user-0.2.3 vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/spec/fixtures/ssl/generate.sh
plyom_user-0.2.2 vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/spec/fixtures/ssl/generate.sh
plyom_user-0.2.1 vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/spec/fixtures/ssl/generate.sh
plyom_user-0.2.0 vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/spec/fixtures/ssl/generate.sh
plyom_user-0.1.9 vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/spec/fixtures/ssl/generate.sh
plyom_user-0.1.8 vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/spec/fixtures/ssl/generate.sh
plyom_user-0.1.7 vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/spec/fixtures/ssl/generate.sh
plyom_user-0.1.6 vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/spec/fixtures/ssl/generate.sh
plyom_user-0.1.5 vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/spec/fixtures/ssl/generate.sh
plyom_user-0.1.4 vendor/bundle/ruby/2.0.0/gems/httparty-0.11.0/spec/fixtures/ssl/generate.sh