Skip to content

Commit

Permalink
Update the self-signed certificate
Browse files Browse the repository at this point in the history
  • Loading branch information
illuspas committed Mar 29, 2024
1 parent 414f2f7 commit f355c6f
Show file tree
Hide file tree
Showing 8 changed files with 50 additions and 53 deletions.
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -309,9 +309,7 @@ nms.on('donePlay', (id, StreamPath, args) => {

## Generate certificate
```bash
openssl genrsa -out privatekey.pem 1024
openssl req -new -key privatekey.pem -out certrequest.csr
openssl x509 -req -in certrequest.csr -signkey privatekey.pem -out certificate.pem
openssl req -newkey rsa:2048 -new -nodes -x509 -days 3650 -keyout key.pem -out cert.pem
```

## Config https
Expand Down
4 changes: 1 addition & 3 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,7 @@ nms.on('donePlay', (id, StreamPath, args) => {

## 生成证书
```bash
openssl genrsa -out privatekey.pem 1024
openssl req -new -key privatekey.pem -out certrequest.csr
openssl x509 -req -in certrequest.csr -signkey privatekey.pem -out certificate.pem
openssl req -newkey rsa:2048 -new -nodes -x509 -days 3650 -keyout key.pem -out cert.pem
```

## 配置 https支持
Expand Down
8 changes: 4 additions & 4 deletions bin/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ const config = {
ping_timeout: 60,
// ssl: {
// port: 443,
// key: __dirname+'/privatekey.pem',
// cert: __dirname+'/certificate.pem',
// key: __dirname+'/key.pem',
// cert: __dirname+'/cert.pem',
// }
},
http: {
Expand All @@ -47,8 +47,8 @@ const config = {
},
https: {
port: argv.https_port,
key: __dirname+'/privatekey.pem',
cert: __dirname+'/certificate.pem',
key: __dirname+'/key.pem',
cert: __dirname+'/cert.pem',
},
auth: {
api: true,
Expand Down
16 changes: 16 additions & 0 deletions bin/cert.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
-----BEGIN CERTIFICATE-----
MIICljCCAX4CCQDlnzSO3exSwjANBgkqhkiG9w0BAQsFADANMQswCQYDVQQGEwJD
TjAeFw0yNDAzMjkwODI0NDdaFw0zNDAzMjcwODI0NDdaMA0xCzAJBgNVBAYTAkNO
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA18Gf7xZV8ghpxojQohOg
cftTXrPDwye6HAPyTQZYmNyi2vEphXDXsZzQ9DE6NGzZeAz97hBPaLxIacW0aod0
rhJJ0sp8v+cfBReUG11RZlsxJ+KVClPZabD4O2WU34uWRMiL6zty+mhXV+aH18jP
ntSjg9UE3TEODgxhfMJNzRnjfY6d2wRfoHY5QgZpot5S7xN7kd6yLyJfG9ryWVZp
sz0rAe9U4H2BQ8rFdw8ndvmupbiXVTUN4UqwTe2qof06+WkPIkCK66YwwpwYz+/M
mvzzKTEcr9L14n/aTCZh18ZoeS+S3huAc+BEVWfPmUAemiJPZBF3ZxYZiIDB4+WG
3wIDAQABMA0GCSqGSIb3DQEBCwUAA4IBAQCqjqeojnXRlb6hjtRNu0r7yqnC7HJP
nTTnIdvi2BzG3UaCTyOj0WClEV/vcTycUgsSSH0PRrztMZC8Jj1N2XyT/caHUKpb
N/lz5a2V4iAkV4U+KS89qiT9Xntqc+Rn67dCthMDBzw0ItTuyEfJ4IHXCowtAP7t
yBxnhNuGlC+bAmZqH/I7T2eQfp10m8s9gmvXz5cR50QYO2A5NIxr5zFHIL9g1+4j
J1De6aYj0VgjuyR1sgQYCALTIgx2h0oke+ZCfzXRvUlHvcnYulLRDJS6pNvc2FjS
2MTEVe7O9n1+6B+WwKi1/yMWGYOIlydz1hauHKWjyMJkqtg36rZfCL8h
-----END CERTIFICATE-----
16 changes: 0 additions & 16 deletions bin/certificate.pem

This file was deleted.

12 changes: 0 additions & 12 deletions bin/certrequest.csr

This file was deleted.

28 changes: 28 additions & 0 deletions bin/key.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
-----BEGIN PRIVATE KEY-----
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDXwZ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BAdECgYBKKpSizbOAlPnZQvwAdl1H2FEYNJrAe+BMSZ/ac9HJHq/MOg6n
0Uha5+H9WeeToJAmsEgd7dJ2P6eMcIQILIRNaUYQGNqagfmHyMTbRtVz0ivtKUeB
ggZPBCjp4AJqHe6tVX/bIvrY/9l2AEGADHN0AGuQ27pKxnnb2ZqJ9ZqILwKBgQCc
S5wylVKljnjWVh2C3SynaFEqhgvBgDfT6cVoH8KqUvQ+v3Tpy9Ovym7u+jA3AXl4
NxiXIK4V2t0ekbC8GFhYvOKF+cvYBDlYcKuKik4EnGH6dx5N5TLYcjhtLOPiZ+X0
LniJfPLXRJ8O8dzcd/u/3atZg7ob4tfKOJ7AbZt+MQKBgGmdX4Tm/IaQRLsWEzng
1Os6cCSTUa+74YvJSfEhHZn4C9iEVuWEA70dZATQ3YW0xdQQTG1OaHHJueUr5LFj
WtleKJZ1tz1Zfj1imOaj1RZMFxpgMdAPJ7RYAoSJWWJt2m33/DNCtKmDdIUM/A38
SlC+hbTBwNByxYXQ3MSFhW/3
-----END PRIVATE KEY-----
15 changes: 0 additions & 15 deletions bin/privatekey.pem

This file was deleted.

0 comments on commit f355c6f

Please sign in to comment.