Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -330,3 +330,5 @@ ASALocalRun/
.mfractor/
.claude/settings.local.json
sample change.txt
.claude/settings.json

1 change: 1 addition & 0 deletions HydrantCAProxy/Client/Models/Enums/RevocationReasons.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
7 changes: 5 additions & 2 deletions HydrantCAProxy/RequestManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@
RevocationReasons returnStatus;
switch (keyfactorRevokeReason)
{
case 0:
returnStatus = RevocationReasons.Unspecified;
break;
case 1:
returnStatus = RevocationReasons.KeyCompromise;
break;
Expand All @@ -92,13 +95,13 @@
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();
return returnStatus;
}

Check failure on line 104 in HydrantCAProxy/RequestManager.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-generate-readme-workflow / Use private doctool action in public repository

} expected

Check failure on line 104 in HydrantCAProxy/RequestManager.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-generate-readme-workflow / Use private doctool action in public repository

} expected

Check failure on line 104 in HydrantCAProxy/RequestManager.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-generate-readme-workflow / Use private doctool action in public repository

} expected

Check failure on line 104 in HydrantCAProxy/RequestManager.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-generate-readme-workflow / Use private doctool action in public repository

} expected

Check failure on line 104 in HydrantCAProxy/RequestManager.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-generate-readme-workflow / Use private doctool action in public repository

} expected

Check failure on line 104 in HydrantCAProxy/RequestManager.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-generate-readme-workflow / Use private doctool action in public repository

} expected

Check failure on line 104 in HydrantCAProxy/RequestManager.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-dotnet-build-and-release-workflow / dotnet-build-and-release

} expected

Check failure on line 104 in HydrantCAProxy/RequestManager.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-dotnet-build-and-release-workflow / dotnet-build-and-release

} expected

Check failure on line 104 in HydrantCAProxy/RequestManager.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-dotnet-build-and-release-workflow / dotnet-build-and-release

} expected

Check failure on line 104 in HydrantCAProxy/RequestManager.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-dotnet-build-and-release-workflow / dotnet-build-and-release

} expected

Check failure on line 104 in HydrantCAProxy/RequestManager.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-dotnet-build-and-release-workflow / dotnet-build-and-release

} expected

Check failure on line 104 in HydrantCAProxy/RequestManager.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-dotnet-build-and-release-workflow / dotnet-build-and-release

} expected

Check failure on line 104 in HydrantCAProxy/RequestManager.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-dotnet-build-and-release-workflow / dotnet-build-and-release

} expected

Check failure on line 104 in HydrantCAProxy/RequestManager.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-dotnet-build-and-release-workflow / dotnet-build-and-release

} expected

Check failure on line 104 in HydrantCAProxy/RequestManager.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-dotnet-build-and-release-workflow / dotnet-build-and-release

} expected
catch (RevokeReasonNotSupportedException)
{
throw;
Expand Down
Loading