Skip to content

Commit 7319937

Browse files
authored
Merge pull request #887 from steven-tomlinson/PEM-SSL-config
Update SSL Certificate Naming Convention (Issue 876)
2 parents 7dc4da7 + 2031792 commit 7319937

File tree

4 files changed

+12
-14
lines changed

4 files changed

+12
-14
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ RUN openssl req \
88
-nodes \
99
-x509 \
1010
-subj "/C=US/ST=Denial/L=Springfield/O=Dis/CN=www.example.com" \
11-
-keyout cert.key \
12-
-out cert.pem
11+
-keyout privkey.pem \
12+
-out fullchain.pem
1313
CMD npm run solid start

EXAMPLES.md

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ solid can be started on its own by using the solid binary. Below are some exampl
1212

1313
* Starting solid as an HTTPS server with WebID+TLS authentication. This parameter requires that the user specifies the location of the key and the certificate used to start the HTTPS server with the help of the appropriate parameters.
1414

15-
`$ solid --root /var/www --webid --cert ./cert.pem --key ./key.pem`
15+
`$ solid --root /var/www --webid --cert ./fullchain.pem --key ./privkey.pem`
1616

1717
* Start HTTPS with custom error pages. solid will look for a file in the specified directory of the form <error-code>.html. If it's not found it will default to node's error page.
1818

19-
`$ solid --root /var/www/ --webid --cert ./cert.pem --key ./key.pem --error-pages ./errors/`
19+
`$ solid --root /var/www/ --webid --cert ./fullchain.pem --key ./privkey.pem --error-pages ./errors/`
2020

2121
* solid makes use of special files used for things such as access control, metadata management, subscription to changes, etc. These files are recognized by solid because of their suffix, which can be customized with the command line options that start with 'suffix'.
2222

@@ -47,8 +47,3 @@ var existingApp; //Some existing Express app independent of solid.
4747
var app = solid(options);
4848
exisingApp.use('/mount-point', app);
4949
```
50-
51-
52-
53-
54-

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,18 @@ Solid requires SSL certificates to be valid, so you cannot use self-signed certi
7272
You need an SSL certificate from a _certificate authority_, such as your domain provider or [Let's Encrypt!](https://letsencrypt.org/getting-started/).
7373

7474
For testing purposes, you can use `bin/solid-test` with a _self-signed_ certificate, generated as follows:
75+
7576
```
76-
$ openssl genrsa 2048 > ../localhost.key
77-
$ openssl req -new -x509 -nodes -sha256 -days 3650 -key ../localhost.key -subj '/CN=*.localhost' > ../localhost.cert
77+
$ openssl req -outform PEM -keyform PEM -new -x509 -sha256 -newkey rsa:2048 -nodes -keyout ../privkey.pem -days 365 -out ../fullchain.pem
78+
7879
```
7980

80-
Note that this example creates the `localhost.cert` and `localhost.key` files
81+
Note that this example creates the `fullchain.pem` and `privkey.pem` files
8182
in a directory one level higher from the current, so that you don't
8283
accidentally commit your certificates to `solid` while you're developing.
8384

85+
If you would like to get rid of the browser warnings, import your fullchain.pem certificate into your 'Trusted Root Certificate' store.
86+
8487
### Run multi-user server (intermediate)
8588

8689
You can run `solid` so that new users can sign up, in other words, get their WebIDs _username.yourdomain.com_.

config.json-default

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
"mount": "/",
77
"configPath": "./config",
88
"dbPath": "./.db",
9-
"sslKey": "./cert.key",
10-
"sslCert": "./cert.pem",
9+
"sslKey": "./privkey.pem",
10+
"sslCert": "./fullchain.pem",
1111
"multiuser": true,
1212
"corsProxy": "/proxy"
1313
}

0 commit comments

Comments
 (0)