Skip to content

Commit

Permalink
v1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
nilsbehlen committed May 24, 2024
1 parent cff0a73 commit 4f5f0d1
Show file tree
Hide file tree
Showing 6 changed files with 1,319 additions and 18 deletions.
1 change: 1 addition & 0 deletions CAService/CAService.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<PlatformTarget>x64</PlatformTarget>
<ApplicationIcon>privacyidea_logo.ico</ApplicationIcon>
<Platforms>AnyCPU;x64</Platforms>
<Version>1.0.1</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
5 changes: 4 additions & 1 deletion CAService/CertOperations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,12 @@ public int GetCertificateValidity(string caName, string serialNumber)
// Get the signer certificate for the container and create the request
CSignerCertificate signer = new();
string? requestStr = null;
bool enrollAgentCertUseMachineStore = Settings.GetBool("enrollment_agent_cert_machine_store");
string store = enrollAgentCertUseMachineStore ? "machine store" : "user store";
_logger.Log($"Looking up EnrollmentAgent cert in {store}.");
if (Settings.GetString("enrollment_agent_cert_thumbprint", _logger) is string s)
{
signer.Initialize(true, X509PrivateKeyVerify.VerifyNone, EncodingType.XCN_CRYPT_STRING_HEXRAW, s);
signer.Initialize(enrollAgentCertUseMachineStore, X509PrivateKeyVerify.VerifyNone, EncodingType.XCN_CRYPT_STRING_HEXRAW, s);
objCmc.SignerCertificate = signer;
objCmc.Encode();
requestStr = objCmc.RawData;
Expand Down
Loading

0 comments on commit 4f5f0d1

Please sign in to comment.