ssl: missing serialnumber assignment
This commit is contained in:
parent
b0f38f3beb
commit
7f0b66f7df
1 changed files with 2 additions and 1 deletions
|
|
@ -12,7 +12,7 @@ function randomSerialNumber() {
|
|||
|
||||
var mostSiginficativeHexAsInt = parseInt(hexString[0], 16)
|
||||
if (mostSiginficativeHexAsInt < 8) {
|
||||
return hexString
|
||||
return hexString
|
||||
}
|
||||
|
||||
mostSiginficativeHexAsInt -= 8
|
||||
|
|
@ -29,6 +29,7 @@ function createCertificate() {
|
|||
cert.publicKey = keys.publicKey
|
||||
cert.validity.notBefore = new Date()
|
||||
cert.validity.notAfter.setFullYear(cert.validity.notBefore.getFullYear() + 1)
|
||||
cert.serialNumber = randomSerialNumber()
|
||||
|
||||
var attrs = [
|
||||
{name:'commonName',value: settings.infos.name},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue