create certs valid 2 years

Update create_certs to generate certificates valid for 2 years per (https://support.apple.com/en-us/HT210176)
This commit is contained in:
Brian Martin 2019-10-01 09:57:30 -04:00
parent c8acac767f
commit e873e22fd3
5 changed files with 2 additions and 2 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -95,7 +95,7 @@ func make_CA(outCertDirectory string) {
Organization: []string{"Bumper"}, Organization: []string{"Bumper"},
}, },
NotBefore: time.Now(), NotBefore: time.Now(),
NotAfter: time.Now().AddDate(10, 0, 0), NotAfter: time.Now().AddDate(2, 0, 0),
SubjectKeyId: bigIntHash(priv.N), SubjectKeyId: bigIntHash(priv.N),
AuthorityKeyId: bigIntHash(priv.N), AuthorityKeyId: bigIntHash(priv.N),
KeyUsage: x509.KeyUsageCertSign | x509.KeyUsageCRLSign, KeyUsage: x509.KeyUsageCertSign | x509.KeyUsageCRLSign,
@ -198,7 +198,7 @@ func signCert(outCertDirectory string, inBumperSan string) {
SubjectKeyId: bigIntHash(privateKey.N), SubjectKeyId: bigIntHash(privateKey.N),
AuthorityKeyId: ca.RawSubject, AuthorityKeyId: ca.RawSubject,
NotBefore: time.Now(), NotBefore: time.Now(),
NotAfter: time.Now().AddDate(10, 0, 0), NotAfter: time.Now().AddDate(2, 0, 0),
IsCA: false, IsCA: false,
BasicConstraintsValid: true, BasicConstraintsValid: true,
ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageClientAuth, x509.ExtKeyUsageServerAuth}, ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageClientAuth, x509.ExtKeyUsageServerAuth},