Browse Source

common/ocsp: fix dropped error

Lars Lehtonen 1 năm trước cách đây
mục cha
commit
06734d6f08
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  1. 3 0
      common/ocsp/ocsp.go

+ 3 - 0
common/ocsp/ocsp.go

@@ -28,6 +28,9 @@ func GetOCSPStapling(cert [][]byte, path string) ([]byte, error) {
 	ocspData, err := GetOCSPForFile(path)
 	if err != nil {
 		ocspData, err = GetOCSPForCert(cert)
+		if err != nil {
+			return nil, err
+		}
 		if !CheckOCSPFileIsNotExist(path) {
 			err = os.Remove(path)
 			if err != nil {