From af14fca70f7340359950a206829916a948caefc4 Mon Sep 17 00:00:00 2001 From: Andrew Ayer Date: Wed, 23 Mar 2016 20:18:12 -0700 Subject: [PATCH] Add HasParseErrors method to EntryInfo --- helpers.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/helpers.go b/helpers.go index 46901ee..6d8e209 100644 --- a/helpers.go +++ b/helpers.go @@ -214,6 +214,16 @@ func (info *CertInfo) Environ () []string { return env } +func (info *EntryInfo) HasParseErrors () bool { + return info.ParseError != nil || + info.CertInfo.DNSNamesParseError != nil || + info.CertInfo.SubjectParseError != nil || + info.CertInfo.IssuerParseError != nil || + info.CertInfo.SerialNumberParseError != nil || + info.CertInfo.ValidityParseError != nil || + info.CertInfo.ConstraintsParseError != nil +} + func (info *EntryInfo) Fingerprint () string { if len(info.FullChain) > 0 { return sha256hex(info.FullChain[0])