ocsp: don't use iota for externally defined constants
Style fix: iota shouldn't be used for values that come from RFCs or
things that go over the wire or to disk.
Change-Id: Ib903ec1bce7e71ff81094db3de8d0b71e16f52f3
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/564695
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Roland Shoemaker <roland@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Roland Shoemaker <roland@golang.org>
diff --git a/ocsp/ocsp.go b/ocsp/ocsp.go
index 4269ed1..bf22595 100644
--- a/ocsp/ocsp.go
+++ b/ocsp/ocsp.go
@@ -279,21 +279,22 @@
// This is the exposed reflection of the internal OCSP structures.
-// The status values that can be expressed in OCSP. See RFC 6960.
+// The status values that can be expressed in OCSP. See RFC 6960.
+// These are used for the Response.Status field.
const (
// Good means that the certificate is valid.
- Good = iota
+ Good = 0
// Revoked means that the certificate has been deliberately revoked.
- Revoked
+ Revoked = 1
// Unknown means that the OCSP responder doesn't know about the certificate.
- Unknown
+ Unknown = 2
// ServerFailed is unused and was never used (see
// https://go-review.googlesource.com/#/c/18944). ParseResponse will
// return a ResponseError when an error response is parsed.
- ServerFailed
+ ServerFailed = 3
)
-// The enumerated reasons for revoking a certificate. See RFC 5280.
+// The enumerated reasons for revoking a certificate. See RFC 5280.
const (
Unspecified = 0
KeyCompromise = 1