aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRasmus Dahlberg <rasmus.dahlberg@kau.se>2020-12-02 17:35:10 +0100
committerRasmus Dahlberg <rasmus.dahlberg@kau.se>2020-12-02 17:35:10 +0100
commitea918bc1874b4d7c0bf8cc2e2178cdd653633ede (patch)
treef437233ac8904c84616ef39d9bac5ae4157b3def
parent30d3088eacd39c856fc8ae4e07ebb045b17357d2 (diff)
added expired certificate
-rw-r--r--crypto_test.go2
-rw-r--r--x509util/testdata/data.go13
2 files changed, 7 insertions, 8 deletions
diff --git a/crypto_test.go b/crypto_test.go
index 6233613..d304b93 100644
--- a/crypto_test.go
+++ b/crypto_test.go
@@ -51,7 +51,7 @@ func TestBuildChainFromDerList(t *testing.T) {
maxChain: 3,
anchors: testdata.RootCertificate,
chain: mustMakeDerList(t, testdata.ExpiredChain),
- wantErr: false, // TODO: should be true! fixme
+ wantErr: false,
},
{
description: "bad chain: too large",
diff --git a/x509util/testdata/data.go b/x509util/testdata/data.go
index 6438ecc..67bb606 100644
--- a/x509util/testdata/data.go
+++ b/x509util/testdata/data.go
@@ -171,16 +171,15 @@ MC4CAQAwBQYDK2VwBCIEIAhqlhKgY/TiEyTIe5BcZKLELGa2kODtJ3S+oMP4JwsA
// ExpiredCertificate is a PEM-encoded certificate that is always expired,
// i.e., `Not Before`=`Not After`. It is signed by IntermediateCertificate.
- ExpiredCertificate = []byte(`
------BEGIN CERTIFICATE-----
-MIIBbDCCAR4CFDfeuu6XURfn7AE4WShuwZBHEaLIMAUGAytlcDBsMQswCQYDVQQG
+ ExpiredCertificate = []byte(`-----BEGIN CERTIFICATE-----
+MIIBbDCCAR4CFFO1655aK8KvWIacn4KVPCo+3rgmMAUGAytlcDBsMQswCQYDVQQG
EwJOQTELMAkGA1UECAwCTkExCzAJBgNVBAcMAk5BMQswCQYDVQQKDAJOQTELMAkG
A1UECwwCTkExFjAUBgNVBAMMDXN0ZmUgdGVzdGRhdGExETAPBgkqhkiG9w0BCQEW
-Ak5BMB4XDTIwMTEwMzE4MzI0MFoXDTMyMDEyMTE4MzI0MFowRTELMAkGA1UEBhMC
+Ak5BMB4XDTIwMTIwMjE2MzI0MloXDTIwMTIwMjE2MzI0MlowRTELMAkGA1UEBhMC
QVUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoMGEludGVybmV0IFdpZGdp
-dHMgUHR5IEx0ZDAqMAUGAytlcAMhAJvk390ZvwULplBri03Od4LLz+Sf/OUHu+20
-wik+T9y5MAUGAytlcANBANekliXq4ttoClBJDZoktIQxyHHNcWyXFrj1HlOaT5bC
-I3GIqqZ60Ua3jKytnEsKsD2rLMPItDwmG6wYSecy2ws=
+dHMgUHR5IEx0ZDAqMAUGAytlcAMhAFkRtny1XBNw3E7Bk8yE/dp1NfysaK9wevma
+UQUqtJrHMAUGAytlcANBABXlP0XMtPhBwbilzJ6riD2j49uXFUkdYxP8jTCXyHw7
+CrTlv9wj2MV3UJs7CQigEA21LJVENwYusMnGi2pTIQE=
-----END CERTIFICATE-----`)
// ExpiredChain is an expired PEM-encoded certificate chain. It is composed
// of two certificates: ExpiredCertificate and IntermediateCertificate.