Sha256: bcf1180fe6f9c5e52187f2cca642462cfb1cec3c796c79c4b640f135d50f6b76

Contents?: true

Size: 1017 Bytes

Versions: 20

Compression:

Stored size: 1017 Bytes

Contents

#!/bin/sh

get_subject() {
  if [ "$1" = "trusted" ]
  then
    echo "/C=IT/ST=Sicily/L=Catania/O=Redis/OU=Security/CN=127.0.0.1"
  else
    echo "/C=XX/ST=Untrusted/L=Evilville/O=Evil Hacker/OU=Attack Department/CN=127.0.0.1"
  fi
}

# Generate two CAs: one to be considered trusted, and one that's untrusted
for type in trusted untrusted; do
  rm -rf ./demoCA
  mkdir -p ./demoCA
  mkdir -p ./demoCA/certs
  mkdir -p ./demoCA/crl
  mkdir -p ./demoCA/newcerts
  mkdir -p ./demoCA/private
  touch ./demoCA/index.txt

  openssl genrsa -out ${type}-ca.key 2048
  openssl req -new -x509 -days 12500 -key ${type}-ca.key -out ${type}-ca.crt -subj "$(get_subject $type)"
  openssl x509 -in ${type}-ca.crt -noout -next_serial -out ./demoCA/serial

  openssl req -newkey rsa:2048 -keyout ${type}-cert.key -nodes -out ${type}-cert.req -subj "$(get_subject $type)"
  openssl ca -days 12500 -cert ${type}-ca.crt -keyfile ${type}-ca.key -out ${type}-cert.crt -infiles ${type}-cert.req
  rm ${type}-cert.req
done

rm -rf ./demoCA

Version data entries

20 entries across 19 versions & 6 rubygems

Version Path
finsync_redis-3.3.5 test/support/ssl/gen_certs.sh
redis-4.0.3 test/support/ssl/gen_certs.sh
redis-4.1.0.beta1 test/support/ssl/gen_certs.sh
redis-4.0.2 test/support/ssl/gen_certs.sh
redis-3.3.5 test/support/ssl/gen_certs.sh
redis-4.0.1 test/support/ssl/gen_certs.sh
redis-4.0.0 test/support/ssl/gen_certs.sh
logstash-filter-cache-redis-0.3.1 vendor/bundle/jruby/1.9/gems/redis-3.3.3/test/support/ssl/gen_certs.sh
logstash-filter-cache-redis-0.3.0 vendor/bundle/jruby/1.9/gems/redis-3.3.3/test/support/ssl/gen_certs.sh
logstash-filter-cache-redis-0.2.0 vendor/bundle/jruby/1.9/gems/redis-3.3.3/test/support/ssl/gen_certs.sh
logstash-filter-cache-redis-0.1.0 vendor/bundle/jruby/1.9/gems/redis-3.3.3/test/support/ssl/gen_certs.sh
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/redis-3.3.3/test/support/ssl/gen_certs.sh
redis-3.3.3 test/support/ssl/gen_certs.sh
abaci-0.3.0 vendor/bundle/gems/redis-3.3.1/test/support/ssl/gen_certs.sh
abaci-0.3.0 vendor/bundle/gems/redis-3.3.2/test/support/ssl/gen_certs.sh
redis-4.0.0.rc1 test/support/ssl/gen_certs.sh
redis-3.3.2 test/support/ssl/gen_certs.sh
redis-3.3.1 test/support/ssl/gen_certs.sh
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/redis-3.3.0/test/support/ssl/gen_certs.sh
redis-3.3.0 test/support/ssl/gen_certs.sh