vendor: updating dependencies
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
parent
c5b7548e35
commit
50d22c5135
428 changed files with 153917 additions and 2562 deletions
21
vendor/golang.org/x/crypto/ocsp/ocsp_test.go
generated
vendored
21
vendor/golang.org/x/crypto/ocsp/ocsp_test.go
generated
vendored
|
@ -225,7 +225,6 @@ func TestOCSPResponse(t *testing.T) {
|
|||
},
|
||||
}
|
||||
|
||||
producedAt := time.Now().Truncate(time.Minute)
|
||||
thisUpdate := time.Date(2010, 7, 7, 15, 1, 5, 0, time.UTC)
|
||||
nextUpdate := time.Date(2010, 7, 7, 18, 35, 17, 0, time.UTC)
|
||||
template := Response{
|
||||
|
@ -284,8 +283,9 @@ func TestOCSPResponse(t *testing.T) {
|
|||
t.Errorf("resp.Extensions: got %v, want %v", resp.Extensions, template.ExtraExtensions)
|
||||
}
|
||||
|
||||
if !resp.ProducedAt.Equal(producedAt) {
|
||||
t.Errorf("resp.ProducedAt: got %d, want %d", resp.ProducedAt, producedAt)
|
||||
delay := time.Since(resp.ProducedAt)
|
||||
if delay < -time.Hour || delay > time.Hour {
|
||||
t.Errorf("resp.ProducedAt: got %s, want close to current time (%s)", resp.ProducedAt, time.Now())
|
||||
}
|
||||
|
||||
if resp.Status != template.Status {
|
||||
|
@ -343,6 +343,21 @@ func TestOCSPDecodeMultiResponse(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
func TestOCSPDecodeMultiResponseWithoutMatchingCert(t *testing.T) {
|
||||
wrongCert, _ := hex.DecodeString(startComHex)
|
||||
cert, err := x509.ParseCertificate(wrongCert)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
responseBytes, _ := hex.DecodeString(ocspMultiResponseHex)
|
||||
_, err = ParseResponseForCert(responseBytes, cert, nil)
|
||||
want := ParseError("no response matching the supplied certificate")
|
||||
if err != want {
|
||||
t.Errorf("err: got %q, want %q", err, want)
|
||||
}
|
||||
}
|
||||
|
||||
// This OCSP response was taken from Thawte's public OCSP responder.
|
||||
// To recreate:
|
||||
// $ openssl s_client -tls1 -showcerts -servername www.google.com -connect www.google.com:443
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue