Skip to content

Commit 70a9a17

Browse files
Merge 69213a3 into 7ab81f8
2 parents 7ab81f8 + 69213a3 commit 70a9a17

3 files changed

Lines changed: 8 additions & 2 deletions

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,3 +330,5 @@ ASALocalRun/
330330
.mfractor/
331331
.claude/settings.local.json
332332
sample change.txt
333+
.claude/settings.json
334+

HydrantCAProxy/Client/Models/Enums/RevocationReasons.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ namespace Keyfactor.HydrantId.Client.Models.Enums
1616
[JsonConverter(typeof(StringEnumConverter))]
1717
public enum RevocationReasons
1818
{
19+
[EnumMember(Value = "0")] Unspecified = 0,
1920
[EnumMember(Value = "1")] KeyCompromise = 1,
2021
[EnumMember(Value = "3")] AffiliationChanged = 3,
2122
[EnumMember(Value = "4")] Superseded = 4,

HydrantCAProxy/RequestManager.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ public RevocationReasons GetMapRevokeReasons(uint keyfactorRevokeReason)
7878
RevocationReasons returnStatus;
7979
switch (keyfactorRevokeReason)
8080
{
81+
case 0:
82+
returnStatus = RevocationReasons.Unspecified;
83+
break;
8184
case 1:
8285
returnStatus = RevocationReasons.KeyCompromise;
8386
break;
@@ -92,8 +95,8 @@ public RevocationReasons GetMapRevokeReasons(uint keyfactorRevokeReason)
9295
break;
9396
default:
9497
Log.LogError("GetMapRevokeReasons: unsupported revoke reason {Reason}", keyfactorRevokeReason);
95-
throw new RevokeReasonNotSupportedException($"Revoke reason {keyfactorRevokeReason} is not supported. Supported values: 1 (KeyCompromise), 3 (AffiliationChanged), 4 (Superseded), 5 (CessationOfOperation).");
96-
}
98+
99+
throw new RevokeReasonNotSupportedException($"Revoke reason {keyfactorRevokeReason} is not supported. Supported values: 0 (Unspecified), 1 (KeyCompromise), 3 (AffiliationChanged), 4 (Superseded), 5 (CessationOfOperation).");
97100

98101
Log.LogTrace("GetMapRevokeReasons: {Input} -> {Mapped}", keyfactorRevokeReason, returnStatus);
99102
Log.MethodExit();

0 commit comments

Comments
 (0)