summaryrefslogtreecommitdiff
path: root/jstests/libs/server-with-ip-san-2.csr.in
blob: 9e7923c7e296d22ddebee5d046c1b0b727be4784 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# To create a Server PEM key off of this file, just run
# openssl genrsa -out server.key 2048
# openssl req -new -key server.key -out server.csr -config openssl_SAN.csr.in -extensions v3_req                                                   #Creates the unsigned server certificate (change v3_req to whatever extensions in the cfg file)
# openssl x509 -req -days 3650 -in server.csr -CA ca.pem -set_serial 01 -out server.crt -extfile openssl_SAN2.csr.in -extensions v3_req            #Creates the signed server certificate
# cat server.crt server.key > server.pem                                                                                                           #Joins the signed cert with the key for the server pem

[ ca ]
default_ca      = CA_default

[ CA_default ]
dir = .
certificate = $dir/ca.pem


[ req ]
default_bits = 4096
default_keyfile = privateKey.pem
distinguished_name = req_distinguished_name
prompt = no
req_extensions = v3_req

[ req_distinguished_name ]
C = US
ST = New York
L = New York City
O = MongoDB
OU = Kernel Users
CN = Kernel Users

[ v3_req ]
subjectAltName = @alt_names

[ alt_names ]
DNS.1 = localhost
DNS.2 = 127.0.0.1
DNS.3 = ::1