Skip to content

Commit

Permalink
Bump expiration date of test helper generated certs
Browse files Browse the repository at this point in the history
Authored-by: Sarah Weinstein <sweinstein@pivotal.io>
  • Loading branch information
sweinstein22 committed Dec 1, 2020
1 parent ff926a5 commit 6c3ec19
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cf/util/testhelpers/net/make_tls_cert.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ import (
)

func MakeSelfSignedTLSCert() tls.Certificate {
return generateCert([]string{"127.0.0.1", "::1"}, time.Date(2020, time.December, 1, 0, 0, 0, 0, time.UTC), true)
return generateCert([]string{"127.0.0.1", "::1"}, time.Date(2200, time.December, 1, 0, 0, 0, 0, time.UTC), true)
}

func MakeTLSCertWithInvalidHost() tls.Certificate {
return generateCert([]string{"example.com"}, time.Date(2020, time.December, 1, 0, 0, 0, 0, time.UTC), true)
return generateCert([]string{"example.com"}, time.Date(2200, time.December, 1, 0, 0, 0, 0, time.UTC), true)
}

func MakeExpiredTLSCert() tls.Certificate {
return generateCert([]string{"127.0.0.1", "::1"}, time.Date(2000, time.December, 1, 0, 0, 0, 0, time.UTC), true)
}

func MakeUnauthorizedTLSCert() tls.Certificate {
return generateCert([]string{"127.0.0.1", "::1"}, time.Date(2020, time.December, 1, 0, 0, 0, 0, time.UTC), false)
return generateCert([]string{"127.0.0.1", "::1"}, time.Date(2200, time.December, 1, 0, 0, 0, 0, time.UTC), false)
}

func generateCert(hosts []string, notAfter time.Time, isAuthorizedToSign bool) tls.Certificate {
Expand Down

0 comments on commit 6c3ec19

Please sign in to comment.