diff --git a/.gitignore b/.gitignore index b7735f2..e57e8eb 100644 --- a/.gitignore +++ b/.gitignore @@ -330,3 +330,5 @@ ASALocalRun/ .mfractor/ .claude/settings.local.json sample change.txt +.claude/settings.json + diff --git a/HydrantCAProxy/Client/Models/Enums/RevocationReasons.cs b/HydrantCAProxy/Client/Models/Enums/RevocationReasons.cs index b096973..80f1e0e 100644 --- a/HydrantCAProxy/Client/Models/Enums/RevocationReasons.cs +++ b/HydrantCAProxy/Client/Models/Enums/RevocationReasons.cs @@ -16,6 +16,7 @@ namespace Keyfactor.HydrantId.Client.Models.Enums [JsonConverter(typeof(StringEnumConverter))] public enum RevocationReasons { + [EnumMember(Value = "0")] Unspecified = 0, [EnumMember(Value = "1")] KeyCompromise = 1, [EnumMember(Value = "3")] AffiliationChanged = 3, [EnumMember(Value = "4")] Superseded = 4, diff --git a/HydrantCAProxy/RequestManager.cs b/HydrantCAProxy/RequestManager.cs index ac47a34..e43fb42 100644 --- a/HydrantCAProxy/RequestManager.cs +++ b/HydrantCAProxy/RequestManager.cs @@ -78,6 +78,9 @@ public RevocationReasons GetMapRevokeReasons(uint keyfactorRevokeReason) RevocationReasons returnStatus; switch (keyfactorRevokeReason) { + case 0: + returnStatus = RevocationReasons.Unspecified; + break; case 1: returnStatus = RevocationReasons.KeyCompromise; break; @@ -92,8 +95,8 @@ public RevocationReasons GetMapRevokeReasons(uint keyfactorRevokeReason) break; default: Log.LogError("GetMapRevokeReasons: unsupported revoke reason {Reason}", keyfactorRevokeReason); - throw new RevokeReasonNotSupportedException($"Revoke reason {keyfactorRevokeReason} is not supported. Supported values: 1 (KeyCompromise), 3 (AffiliationChanged), 4 (Superseded), 5 (CessationOfOperation)."); - } + + throw new RevokeReasonNotSupportedException($"Revoke reason {keyfactorRevokeReason} is not supported. Supported values: 0 (Unspecified), 1 (KeyCompromise), 3 (AffiliationChanged), 4 (Superseded), 5 (CessationOfOperation)."); Log.LogTrace("GetMapRevokeReasons: {Input} -> {Mapped}", keyfactorRevokeReason, returnStatus); Log.MethodExit();