Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AdminAllowedReason ¶ added in v0.20250922.0
AdminAllowedReason returns true if the given Reason is in the subset of Reasons which admins (i.e. people acting in CA Trusted Roles) are allowed to request. Reasons which do *not* appear here are those which are defined by RFC 5280 but are disallowed by the Baseline Requirements.
func UserAllowedReason ¶ added in v0.20250922.0
UserAllowedReason returns true if the given Reason is in the subset of Reasons which users are allowed to request.
Types ¶
type Reason ¶
type Reason int64
Reason is used to specify a certificate revocation reason
const ( Unspecified Reason = 0 KeyCompromise Reason = 1 CACompromise Reason = 2 AffiliationChanged Reason = 3 Superseded Reason = 4 CessationOfOperation Reason = 5 CertificateHold Reason = 6 // 7 is unused RemoveFromCRL Reason = 8 PrivilegeWithdrawn Reason = 9 AACompromise Reason = 10 )
The enumerated reasons for revoking a certificate. See RFC 5280: https://datatracker.ietf.org/doc/html/rfc5280#section-5.3.1.
func StringToReason ¶ added in v0.20250922.0
StringToReason converts a revocation reason string (such as "keyCompromise") into the corresponding integer reason code (e.g. 1).
func (Reason) String ¶ added in v0.20250922.0
String converts a revocation reason code (such as 0) into its corresponding reason string (e.g. "unspecified").
The receiver *must* be one of the valid reason code constants defined in this package: this method will panic if called on an invalid Reason. It is expected that this method is only called on const Reasons, or after a call to UserAllowedReason or AdminAllowedReason.