Skip to content

Commit

Permalink
Path Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
bhillkeyfactor committed Feb 22, 2024
1 parent 9357f08 commit 55d529b
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions PaloAlto/Jobs/Management.cs
Original file line number Diff line number Diff line change
Expand Up @@ -179,13 +179,11 @@ private bool CheckForDuplicate(ManagementJobConfiguration config, PaloAltoClient
{
CertificateListResponse rawCertificatesResult;

if (IsPanoramaDevice(config))
rawCertificatesResult =
client.GetCertificateList(
$"/config/devices/entry/template/entry[@name='{config.CertificateStoreDetails.StorePath}']//certificate/entry[@name='{certificateName}']")
.Result;
else
rawCertificatesResult = client.GetCertificateList($"/config/shared/certificate/entry[@name='{certificateName}']").Result;
rawCertificatesResult =
client.GetCertificateList(
$"{config.CertificateStoreDetails.StorePath}/certificate/entry[@name='{certificateName}']")
.Result;


var certificatesResult =
rawCertificatesResult.CertificateResult.Entry.FindAll(c => c.PublicKey != null);
Expand Down Expand Up @@ -254,7 +252,7 @@ private JobResult PerformAddition(ManagementJobConfiguration config)
}

//2. Check palo alto for existing thumprints of anything in the chain //todo change path to come from store path
var rawCertificatesResult = client.GetCertificateList($"/config/devices/entry/template/entry[@name='{config.CertificateStoreDetails.StorePath}']//certificate/entry").Result;
var rawCertificatesResult = client.GetCertificateList($"{config.CertificateStoreDetails.StorePath}/certificate/entry").Result;
List<X509Certificate2> certificates = new List<X509Certificate2>();
ErrorSuccessResponse content = null;
string errorMsg = string.Empty;
Expand Down

0 comments on commit 55d529b

Please sign in to comment.