in crlVerification/utils/reason.go [77:105]
func FromString(str *string) (RevocationReason, error) {
if str == nil {
return NOT_GIVEN, nil
}
switch *str {
case "(0) unspecified":
return UNSPECIFIED, nil
case "(1) keyCompromise":
return KEY_COMPROMISE, nil
case "(2) cACompromise":
return CA_COMPROMISE, nil
case "(3) affiliationChanged":
return AFFILIATION_CHANGE, nil
case "(4) superseded":
return SUPERSEDED, nil
case "(5) cessationOfOperation":
return CESSATION_OF_OPERATION, nil
case "(6) certificateHold":
return CERTIFICATE_HOLD, nil
case "(8) removeFromCRL":
return REMOVE_FROM_CRL, nil
case "(9) privilegeWithdrawn":
return PRIVILEGE_WITHDRAWN, nil
case "(10) aACompromise":
return AA_COMPROMISE, nil
default:
return NOT_GIVEN, errors.New(fmt.Sprintf(`unknown revocation reason "%s""`, *str))
}
}