$ ls -Altrh
total 80K
-rw-r--r-- 1 root root 3.0K May 3 2017 win-utf
-rw-r--r-- 1 root root 664 May 3 2017 uwsgi_params
-rw-r--r-- 1 root root 636 May 3 2017 scgi_params
-rw-r--r-- 1 root root 180 May 3 2017 proxy_params
-rw-r--r-- 1 root root 1.5K May 3 2017 nginx.conf
-rw-r--r-- 1 root root 3.9K May 3 2017 mime.types
-rw-r--r-- 1 root root 2.2K May 3 2017 koi-win
-rw-r--r-- 1 root root 2.8K May 3 2017 koi-utf
-rw-r--r-- 1 root root 1007 May 3 2017 fastcgi_params
-rw-r--r-- 1 root root 1.1K May 3 2017 fastcgi.conf
drwxr-xr-x 2 root root 4.0K Jul 27 04:11 modules-available
drwxr-xr-x 2 root root 4.0K Jul 27 04:11 conf.d
drwxr-xr-x 2 root root 4.0K Dec 26 18:08 sites-available
drwxr-xr-x 2 root root 4.0K Dec 26 18:08 snippets
drwxr-xr-x 2 root root 4.0K Dec 26 18:08 sites-enabled
drwxr-xr-x 2 root root 4.0K Dec 26 18:08 modules-enabled
$ sudo openssl genrsa -des3 -out server.key 1024
Generating RSA private key, 1024 bit long modulus
.................................................................++++++
......++++++
e is 65537 (0x10001)
Enter pass phrase for server.key: artifactory
Verifying - Enter pass phrase for server.key: artifactory
$ sudo openssl req -new \
-key server.key \
-out server.csr
Enter pass phrase for server.key: artifactory
You are about to be asked to enter information that will be incorporated into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
*****
Country Name (2 letter code) [AU]:CN
State or Province Name (full name) [Some-State]:Sichuan
Locality Name (eg, city) []:Chengdu
Organization Name (eg, company) [Internet Widgits Pty Ltd]:CompanyName
Organizational Unit Name (eg, section) []:CompanyName
Common Name (e.g. server FQDN or YOUR name) []:docker-2.artifactory
Email Address []:marslo.jiao@CompanyName.com
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:artifactory
An optional company name []:CompanyName
$ ls -Altrh
total 80K
-rw-r--r-- 1 root root 3.0K May 3 2017 win-utf
-rw-r--r-- 1 root root 664 May 3 2017 uwsgi_params
-rw-r--r-- 1 root root 636 May 3 2017 scgi_params
-rw-r--r-- 1 root root 180 May 3 2017 proxy_params
-rw-r--r-- 1 root root 1.5K May 3 2017 nginx.conf
-rw-r--r-- 1 root root 3.9K May 3 2017 mime.types
-rw-r--r-- 1 root root 2.2K May 3 2017 koi-win
-rw-r--r-- 1 root root 2.8K May 3 2017 koi-utf
-rw-r--r-- 1 root root 1007 May 3 2017 fastcgi_params
-rw-r--r-- 1 root root 1.1K May 3 2017 fastcgi.conf
drwxr-xr-x 2 root root 4.0K Jul 27 04:11 modules-available
drwxr-xr-x 2 root root 4.0K Jul 27 04:11 conf.d
drwxr-xr-x 2 root root 4.0K Dec 26 18:08 sites-available
drwxr-xr-x 2 root root 4.0K Dec 26 18:08 snippets
drwxr-xr-x 2 root root 4.0K Dec 26 18:08 sites-enabled
drwxr-xr-x 2 root root 4.0K Dec 26 18:08 modules-enabled
-rw-r--r-- 1 root root 951 Dec 26 18:32 server.key
-rw-r--r-- 1 root root 785 Dec 26 18:36 server.csr
-rw-r--r-- 1 root root 951 Dec 26 18:38 server.key.org
-rw-r--r-- 1 root root 785 Dec 26 18:38 server.csr.org
$ sudo openssl rsa -in server.key.org -out server.key
Enter pass phrase for server.key.org:
writing RSA key
$ sudo openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
Signature ok
subject=/C=CN/ST=Sichuan/L=Chengdu/O=CompanyName/OU=CompanyName/CN=docker-2.artifactory/emailAddress=marslo.jiao@CompanyName.com
Getting Private key
/etc/nginx$ sudo openssl req \
-newkey rsa:2048 \
-nodes \
-sha256 \
-keyout certs/sample.artifactory.com.key \
-x509 \
-days 365 \
-out certs/sample.artifactory.com.crt
Generating a 2048 bit RSA private key
........+++
..............................................................+++
writing new private key to 'certs/sample.artifactory.com.key'
*****
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
*****
Country Name (2 letter code) [AU]:CN
State or Province Name (full name) [Some-State]:Sichuan
Locality Name (eg, city) []:Chengdu
Organization Name (eg, company) [Internet Widgits Pty Ltd]:CompanyName
Organizational Unit Name (eg, section) []:CompanyName
Common Name (e.g. server FQDN or YOUR name) []:sample.artifactory.com
Email Address []:marslo.jiao@CompanyName.com
$ sudo openssl genrsa -des3 -out artifactorykey 2048
Generating RSA private key, 2048 bit long modulus
.........................+++
........................................................................+++
e is 65537 (0x10001)
Enter pass phrase for artifactorykey: artifactory
Verifying - Enter pass phrase for artifactorykey: artifactory
$ sudo openssl req -new \
-key artifactorykey \
-out artifactorycsr
Enter pass phrase for artifactorykey: artifactory
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
*****
Country Name (2 letter code) [AU]:CN
State or Province Name (full name) [Some-State]:Sichuan
Locality Name (eg, city) []:Chengdu
Organization Name (eg, company) [Internet Widgits Pty Ltd]:CompanyName Ltd
Organizational Unit Name (eg, section) []:.
Common Name (e.g. server FQDN or YOUR name) []:192.168.1.102
Email Address []:.
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:.
An optional company name []:.
$ sudo cp artifactorykey{,.org}
$ sudo openssl rsa \
-in artifactorykey.org \
-out artifactorykey
Enter pass phrase for artifactorykey.org: artifactory
writing RSA key
$ sudo openssl x509 -req \
-days 365 \
-in artifactorycsr \
-signkey artifactorykey \
-out artifactorycrt
Signature ok
subject=/C=CN/ST=Sichuan/L=Chengdu/O=CompanyName Ltd/CN=192.168.1.102
Getting Private key
$ openssl x509 -text -noout -in ssl_ip/artifactorycrt
Certificate:
Data:
Version: 1 (0x0)
Serial Number: 9804858425156156035 (0x8811daca106dba83)
Signature Algorithm: sha256WithRSAEncryption
Issuer: C=CN, ST=Sichuan, L=Chengdu, O=CompanyName Ltd, CN=192.168.1.102
Validity
Not Before: Dec 26 16:23:15 2017 GMT
Not After : Dec 26 16:23:15 2018 GMT
Subject: C=CN, ST=Sichuan, L=Chengdu, O=CompanyName Ltd, CN=192.168.1.102
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
Public-Key: (2048 bit)
Modulus:
00:ad:32:26:35:8a:8f:09:82:ff:59:61:14:14:1b:
9c:da:02:74:09:48:2a:d5:05:1d:ad:8a:d0:e0:70:
1f:9b:44:b4:df:4d:c5:4c:5a:1b:8a:52:7b:2a:69:
a2:77:d3:cf:c7:fb:a6:ef:34:d1:bb:23:8d:d0:78:
e6:48:3f:8c:12:3c:69:d5:62:2d:74:24:b8:49:a8:
59:c7:36:5f:64:97:5a:d1:8f:9a:5b:2f:aa:a8:65:
6c:75:28:60:55:b9:2a:5b:41:71:a4:fa:eb:10:7e:
84:4b:fb:c3:57:9c:55:8e:e8:2a:4a:c1:45:74:54:
58:d5:09:0d:59:d4:14:94:db:5b:67:91:9c:23:24:
c4:07:10:d1:f1:28:fa:97:38:01:da:81:c4:f3:63:
d7:84:24:dc:3c:ff:04:64:b2:3e:41:f0:d8:08:66:
06:cc:7c:05:3c:90:97:0b:02:b6:b5:2f:03:28:b7:
4c:38:aa:84:23:3e:9e:d4:b0:3a:58:4c:f3:74:df:
36:63:f2:18:ac:d1:0d:ef:05:6b:f3:dc:b6:d3:c7:
f0:91:7b:b8:69:4f:ae:19:da:34:b7:38:1e:e2:9a:
10:2e:a9:a0:54:f6:61:b9:da:e6:98:c8:9b:76:83:
d6:59:77:d9:18:c6:57:8c:cf:af:a4:89:5a:87:99:
c4:15
Exponent: 65537 (0x10001)
Signature Algorithm: sha256WithRSAEncryption
5a:06:ad:9b:d0:07:d7:9b:92:2a:77:71:ff:80:6e:c1:39:bd:
81:e8:0f:21:39:bd:80:3e:96:a9:6b:7a:73:f1:80:70:4e:b1:
d4:b7:1e:54:be:62:dc:35:c0:b9:d8:8c:d1:24:75:8a:42:ec:
a9:dd:9b:9a:f2:4b:ad:6e:38:d7:a2:fa:7a:70:be:7b:8c:37:
63:71:10:fe:73:18:de:e5:9c:c5:6e:1a:4e:cb:7b:51:26:56:
68:56:fb:4f:71:d7:7b:94:b6:55:b9:f8:9b:31:a8:26:a5:e5:
32:36:33:65:7b:1d:9f:27:7d:f1:b0:d2:06:7c:75:d7:39:bb:
7a:44:92:e1:b8:fc:2b:fd:3c:43:93:d6:47:19:f6:ad:d3:cc:
82:dd:15:bd:d3:a0:e2:2d:92:fd:65:44:60:44:21:b9:1f:31:
fd:91:c2:78:86:d9:aa:77:fd:54:ae:2f:4c:ae:5d:5e:c7:a3:
43:0d:6b:32:23:d9:61:b6:a7:c4:47:eb:bc:c2:79:6c:06:f0:
a6:af:e8:45:c6:02:d5:1c:09:26:8a:a7:b0:ff:74:50:85:82:
1d:88:b2:2c:eb:20:3e:bf:3b:4e:9b:ab:b7:4f:e8:14:a8:1a:
33:50:e9:a8:24:3e:5e:2a:68:ea:fa:f3:12:30:94:8e:0f:0d:
da:6c:17:60
$ sudo openssl genrsa -des3 -out artifactorykey 2048
Generating RSA private key, 2048 bit long modulus
........................+++
.......................................+++
e is 65537 (0x10001)
Enter pass phrase for artifactorykey: artifactory
Verifying - Enter pass phrase for artifactorykey: artifactory
$ sudo openssl req -new -key artifactorykey -out artifactorycsr
Enter pass phrase for artifactorykey: artifactory
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
*****
Country Name (2 letter code) [AU]:CN
State or Province Name (full name) [Some-State]:Sichuan
Locality Name (eg, city) []:Chengdu
Organization Name (eg, company) [Internet Widgits Pty Ltd]:CompanyName Ltd
Organizational Unit Name (eg, section) []:CompanyName CDI
Common Name (e.g. server FQDN or YOUR name) []:docker-1.artifactory
Email Address []:.
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:.
An optional company name []:.
$ sudo cp artifactorykey{,.org}
$ sudo openssl rsa -in artifactorykey.org -out artifactorykey
Enter pass phrase for artifactorykey.org: artifactory
writing RSA key
$ sudo openssl x509 -req \
-days 365 \
-in artifactorycsr \
-signkey artifactorykey \
-out artifactorycrt
Signature ok
subject=/C=CN/ST=Sichuan/L=Chengdu/O=CompanyName Ltd/OU=CompanyName CDI/CN=docker-1.artifactory
Getting Private key
$ openssl x509 -text \
-noout \
-in ssl/artifactorycrt
Certificate:
Data:
Version: 1 (0x0)
Serial Number: 15006671364169185053 (0xd0426818d254b71d)
Signature Algorithm: sha256WithRSAEncryption
Issuer: C=CN, ST=Sichuan, L=Chengdu, O=CompanyName Ltd, OU=CompanyName CDI, CN=docker-1.artifactory
Validity
Not Before: Dec 26 16:02:10 2017 GMT
Not After : Dec 26 16:02:10 2018 GMT
Subject: C=CN, ST=Sichuan, L=Chengdu, O=CompanyName Ltd, OU=CompanyName CDI, CN=docker-1.artifactory
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
Public-Key: (2048 bit)
Modulus:
00:dc:30:6b:83:56:92:fb:f3:fb:bc:da:3e:a9:5c:
67:c3:19:42:9a:8f:8f:30:e6:27:fa:a9:9d:c9:3e:
9c:31:3d:aa:d8:9f:ae:9b:64:b0:75:2a:01:51:ad:
04:c4:00:5d:f4:f8:b4:af:bb:20:f3:77:45:65:28:
d8:38:28:b2:03:46:d0:67:d1:91:8e:7b:65:66:a0:
7e:a5:e2:fe:80:00:5e:54:95:50:52:9c:44:2a:aa:
dc:a2:80:be:16:07:79:b4:13:1d:f5:8a:ca:c3:ab:
1c:76:de:f3:b8:23:9b:54:17:28:be:ac:e5:68:5c:
f3:83:49:61:55:d2:e1:ea:0c:e7:72:75:6e:90:5a:
90:a8:85:01:c6:cc:69:94:5b:c4:f9:14:6d:70:0a:
8e:45:e0:b9:28:aa:99:3a:22:12:db:0b:d7:d9:6e:
aa:35:36:5e:e6:00:eb:99:ab:46:6d:7b:e5:12:b1:
f9:0c:5c:d3:c0:47:7b:b3:e4:03:15:fa:8d:42:f8:
a1:c1:ce:dc:42:d2:81:88:18:0d:26:28:7e:90:cf:
e8:05:84:75:94:e9:ac:20:47:95:c7:50:1c:d8:42:
c3:d7:8b:90:f9:a9:48:cc:a5:8d:88:3b:54:a9:ef:
20:ce:ee:4c:6d:04:65:eb:6c:f7:22:9d:c8:13:33:
b1:6d
Exponent: 65537 (0x10001)
Signature Algorithm: sha256WithRSAEncryption
c3:c7:c8:0d:19:d1:0b:05:ac:11:e3:e4:af:25:0e:95:f5:f5:
31:ed:90:4e:7f:1a:2b:a2:2f:4d:a3:d9:57:40:a2:f6:af:55:
90:53:bf:72:39:81:5d:53:41:85:e0:1d:26:9f:9e:33:05:46:
9c:fc:51:99:19:5c:7d:ef:aa:cc:50:61:0b:f4:11:69:bd:9e:
2a:34:48:e9:9d:7c:d0:e0:80:a5:42:67:ac:8e:0c:d6:84:19:
8e:cb:05:97:9f:21:c5:e0:78:8f:97:f6:53:fa:f2:ec:49:3f:
fb:11:68:ed:ea:c0:8c:c5:be:08:61:e4:bd:4e:05:5f:89:99:
f6:47:6f:b3:1e:5f:49:62:ff:37:dc:f0:c4:4b:bb:a4:15:06:
b1:80:4d:24:ef:bb:25:d6:a5:60:13:34:57:73:ba:b4:b0:8b:
42:0f:18:ef:0e:17:60:83:4d:61:bd:ef:55:b9:52:6a:47:ab:
c3:ee:b3:11:27:86:aa:87:18:d5:60:b8:b4:34:c2:fa:75:48:
0e:f1:f4:30:b3:fa:b3:ad:a9:8a:6e:e6:62:71:02:5a:72:bd:
5c:45:a0:23:ea:1d:84:16:24:3d:88:a0:12:20:61:7a:f8:bd:
dc:0f:fb:26:c0:f3:2f:1f:66:7e:64:35:b6:45:05:c4:00:43:
2d:18:da:a1