Skip to content

Commit

Permalink
Update tests to be independent of ASN.1 marshalling order
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacob H. Haven committed Feb 18, 2016
1 parent 0afaaaa commit 3b8995e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions helpers/testsuite/testing_helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,8 @@ func chainsEqual(chain1, chain2 []*x509.Certificate) bool {
func nullifyTimeDependency(cert *x509.Certificate) *x509.Certificate {
cert.Raw = nil
cert.RawTBSCertificate = nil
cert.RawSubject = nil
cert.RawIssuer = nil
cert.RawSubjectPublicKeyInfo = nil
cert.Signature = nil
cert.PublicKey = nil
Expand All @@ -318,6 +320,11 @@ func nullifyTimeDependency(cert *x509.Certificate) *x509.Certificate {
cert.SubjectKeyId = nil
cert.AuthorityKeyId = nil

cert.Subject.Names = nil
cert.Subject.ExtraNames = nil
cert.Issuer.Names = nil
cert.Issuer.ExtraNames = nil

return cert
}

Expand Down

0 comments on commit 3b8995e

Please sign in to comment.