From b07347640cb417205b25caa89f338057029652ad Mon Sep 17 00:00:00 2001 From: Aaron Klotz Date: Mon, 14 Aug 2023 11:03:02 -0600 Subject: [PATCH] util/winutil/authenticode: add missing docs for CertSubjectError A #cleanup PR. Signed-off-by: Aaron Klotz --- util/winutil/authenticode/authenticode_windows.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/util/winutil/authenticode/authenticode_windows.go b/util/winutil/authenticode/authenticode_windows.go index f6304f6db..1ed0b7cfb 100644 --- a/util/winutil/authenticode/authenticode_windows.go +++ b/util/winutil/authenticode/authenticode_windows.go @@ -104,9 +104,12 @@ func queryPE(utf16Path *uint16, verify bool) (string, SigProvenance, error) { } } +// CertSubjectError is returned if a cert subject was successfully resolved but +// there was a problem encountered during its extraction. The Subject is +// provided for informational purposes but is not presumed to be accurate. type CertSubjectError struct { - Err error - Subject string + Err error // The error that occurred while extracting the cert subject. + Subject string // The (possibly invalid) cert subject that was extracted. } func (e *CertSubjectError) Error() string {