create_certificate script provided
This commit is contained in:
34
README.md
34
README.md
@@ -60,40 +60,30 @@ python -m filebridging.client --help
|
||||
|
||||
## Generating SSL certificates
|
||||
|
||||
You may use `filebridging.create_certificate.py` script or use openssl from the command line.
|
||||
|
||||
###Via script
|
||||
```bash
|
||||
python -m filebridging.create_certificate --name example --domain example.com --force
|
||||
```
|
||||
|
||||
### Via command line
|
||||
Store configuration in file `mycert.csr.cnf` and run the following command to generate a self-signed SSL certificate.
|
||||
```bash
|
||||
openssl req -newkey rsa:2048 -nodes -keyout ./mycert.key \
|
||||
openssl req -newkey rsa:4096 -nodes -keyout ./mycert.key \
|
||||
-x509 -days 365 -out ./mycert.crt \
|
||||
-config <( cat mycert.csr.cnf )
|
||||
-config mycert.csr.cnf
|
||||
```
|
||||
|
||||
|
||||
**mycert.csr.cnf**
|
||||
```text
|
||||
[req]
|
||||
default_bits = 2048
|
||||
[ req ]
|
||||
default_bits = 4096
|
||||
prompt = no
|
||||
default_md = sha256
|
||||
distinguished_name = dn
|
||||
req_extensions = v3_req
|
||||
subjectAltName = @alt_names
|
||||
|
||||
[ v3_req ]
|
||||
basicConstraints = CA:FALSE
|
||||
keyUsage = nonRepudiation, digitalSignature, keyEncipherment
|
||||
subjectAltName = @alt_names
|
||||
|
||||
[dn]
|
||||
C=US
|
||||
ST=YourState
|
||||
L=YourTown
|
||||
O=FileBridging
|
||||
OU=filebridging
|
||||
emailAddress=filebridging@yourdomain.com
|
||||
[ dn ]
|
||||
CN = yourdomain.com
|
||||
|
||||
[ alt_names ]
|
||||
DNS.1 = yourdomain.com
|
||||
DNS.2 = 1.111.111.11
|
||||
```
|
||||
Reference in New Issue
Block a user