Fix certs so peering succeeds
This commit is contained in:
13
gen_conf.sh
13
gen_conf.sh
@ -9,6 +9,9 @@ new_certs_dir = resources/useless_openssl_data/
|
|||||||
database = resources/useless_openssl_data/db
|
database = resources/useless_openssl_data/db
|
||||||
policy = policy_anything
|
policy = policy_anything
|
||||||
serial = resources/useless_openssl_data/serial
|
serial = resources/useless_openssl_data/serial
|
||||||
|
copy_extensions = copy
|
||||||
|
email_in_dn = no
|
||||||
|
rand_serial = no
|
||||||
|
|
||||||
[ policy_anything ]
|
[ policy_anything ]
|
||||||
countryName = optional
|
countryName = optional
|
||||||
@ -18,13 +21,18 @@ organizationName = optional
|
|||||||
organizationalUnitName = optional
|
organizationalUnitName = optional
|
||||||
commonName = supplied
|
commonName = supplied
|
||||||
emailAddress = optional
|
emailAddress = optional
|
||||||
|
|
||||||
|
[ usr_cert ]
|
||||||
|
subjectAltName=subject:copy
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
rm -f resources/useless_openssl_data/db
|
||||||
touch resources/useless_openssl_data/db
|
touch resources/useless_openssl_data/db
|
||||||
echo 01 > resources/useless_openssl_data/serial
|
echo 01 > resources/useless_openssl_data/serial
|
||||||
|
|
||||||
# Generate CA
|
# Generate CA
|
||||||
openssl req -x509 -nodes -newkey rsa:2048 -batch \
|
openssl req -x509 -nodes -newkey rsa:2048 -batch \
|
||||||
|
-subj "/CN=Test CA" \
|
||||||
-outform PEM -out resources/config/ca_cert.pem \
|
-outform PEM -out resources/config/ca_cert.pem \
|
||||||
-keyout resources/ca_cert.key
|
-keyout resources/ca_cert.key
|
||||||
|
|
||||||
@ -32,8 +40,9 @@ for server in $*; do
|
|||||||
openssl genrsa -traditional \
|
openssl genrsa -traditional \
|
||||||
-out resources/config/server_$server.key \
|
-out resources/config/server_$server.key \
|
||||||
2048
|
2048
|
||||||
openssl req -nodes -batch \
|
openssl req -nodes -batch -new \
|
||||||
-in resources/config/server_$server.key \
|
-addext "subjectAltName = DNS:$server" \
|
||||||
|
-key resources/config/server_$server.key \
|
||||||
-outform PEM -out resources/server_$server.req
|
-outform PEM -out resources/server_$server.req
|
||||||
openssl ca -config resources/openssl.cnf -days 3650 -md sha512 -batch \
|
openssl ca -config resources/openssl.cnf -days 3650 -md sha512 -batch \
|
||||||
-subj /CN=$server \
|
-subj /CN=$server \
|
||||||
|
@ -26,12 +26,12 @@
|
|||||||
|
|
||||||
(defn fingerprint
|
(defn fingerprint
|
||||||
[node]
|
[node]
|
||||||
(slurp (str "resources/server_" node ".pem.sha1")))
|
(str/trim (slurp (str "resources/server_" node ".pem.sha1"))))
|
||||||
|
|
||||||
(defn network_conf
|
(defn network_conf
|
||||||
[nodes]
|
[nodes]
|
||||||
{
|
{
|
||||||
:fanout 1
|
:fanout 2
|
||||||
:ca_file "/usr/local/etc/sable/ca_cert.pem"
|
:ca_file "/usr/local/etc/sable/ca_cert.pem"
|
||||||
|
|
||||||
:peers (map (fn [node] {:name node
|
:peers (map (fn [node] {:name node
|
||||||
|
Reference in New Issue
Block a user