Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
leefine02 authored and leefine02 committed Jul 3, 2024
1 parent f4a56dd commit 06f9cd6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion RemoteFile/ReenrollmentBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public JobResult ProcessJob(ReenrollmentJobConfiguration config, SubmitReenrollm
{
logger.LogDebug($" {keyValue.Key}: {keyValue.Value}");
}

ICertificateStoreSerializer certificateStoreSerializer = GetCertificateStoreSerializer(config.CertificateStoreDetails.Properties);

try
Expand Down Expand Up @@ -139,3 +139,4 @@ public JobResult ProcessJob(ReenrollmentJobConfiguration config, SubmitReenrollm
return new JobResult() { Result = OrchestratorJobStatusJobResult.Success, JobHistoryId = config.JobHistoryId };
}
}
}
5 changes: 4 additions & 1 deletion RemoteFile/RemoteCertificateStore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ internal string GenerateCSROnDevice(string subjectText, SupportedKeyTypeEnum key
switch (keyType)
{
case SupportedKeyTypeEnum.RSA:
cmd.Replace("REPLACE", $"rsa:{keySize.ToString()})";
cmd.Replace("REPLACE", $"rsa:{keySize.ToString()}");
break;
case SupportedKeyTypeEnum.ECC:
string algName = "prime256v1";
Expand All @@ -414,6 +414,9 @@ internal string GenerateCSROnDevice(string subjectText, SupportedKeyTypeEnum key
break;
}

RemoteHandler.RunCommand(cmd, null, ApplicationSettings.UseSudo, null);
privateKey = Encoding.UTF8.GetString(RemoteHandler.DownloadCertificateFile(path + fileName + "key"));
return Encoding.UTF8.GetString(RemoteHandler.DownloadCertificateFile(path + fileName + "csr"));
}

internal void Initialize(string sudoImpersonatedUser)
Expand Down

0 comments on commit 06f9cd6

Please sign in to comment.