Skip to content

Commit 803ee9b

Browse files
committed
Update build and release tooling; fixed ECDSA algorithm mapping
1 parent 494741e commit 803ee9b

7 files changed

Lines changed: 25 additions & 26 deletions

File tree

.github/workflows/keyfactor-bootstrap-workflow.yml

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,9 @@ on:
1111

1212
jobs:
1313
call-starter-workflow:
14-
uses: keyfactor/actions/.github/workflows/starter.yml@v4
15-
permissions:
16-
contents: write # Explicitly grant write permission
17-
with:
18-
command_token_url: ${{ vars.COMMAND_TOKEN_URL }}
19-
command_hostname: ${{ vars.COMMAND_HOSTNAME }}
20-
command_base_api_path: ${{ vars.COMMAND_API_PATH }}
14+
uses: keyfactor/actions/.github/workflows/starter.yml@v5
2115
secrets:
22-
token: ${{ secrets.V2BUILDTOKEN}}
23-
gpg_key: ${{ secrets.KF_GPG_PRIVATE_KEY }}
24-
gpg_pass: ${{ secrets.KF_GPG_PASSPHRASE }}
25-
scan_token: ${{ secrets.SAST_TOKEN }}
26-
entra_username: ${{ secrets.DOCTOOL_ENTRA_USERNAME }}
27-
entra_password: ${{ secrets.DOCTOOL_ENTRA_PASSWD }}
28-
command_client_id: ${{ secrets.COMMAND_CLIENT_ID }}
29-
command_client_secret: ${{ secrets.COMMAND_CLIENT_SECRET }}
16+
token: ${{ secrets.V2BUILDTOKEN}} # REQUIRED
17+
gpg_key: ${{ secrets.KF_GPG_PRIVATE_KEY }} # Only required for golang builds
18+
gpg_pass: ${{ secrets.KF_GPG_PASSPHRASE }} # Only required for golang builds
19+
scan_token: ${{ secrets.SAST_TOKEN }} # REQUIRED

AxisIPCamera/AxisIPCamera.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<AppendTargetFrameworkToOutputPath>true</AppendTargetFrameworkToOutputPath>
5-
<TargetFramework>net8.0</TargetFramework>
5+
<TargetFrameworks>net8.0;net10.0</TargetFrameworks>
66
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
77
<ImplicitUsings>disable</ImplicitUsings>
88
<RootNamespace>Keyfactor.Extensions.Orchestrator.AxisIPCamera</RootNamespace>

AxisIPCamera/Inventory.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public JobResult ProcessJob(InventoryJobConfiguration config, SubmitInventoryUpd
4848
_logger.MethodEntry();
4949

5050
_logger.LogTrace($"Begin Inventory for Client Machine {config.CertificateStoreDetails.ClientMachine}...");
51-
string jsonConfig = JsonConvert.SerializeObject(config);
51+
string jsonConfig = JsonConvert.SerializeObject(config, Formatting.Indented);
5252
_logger.LogDebug($"Inventory Config: {jsonConfig.Replace(config.ServerPassword,"**********")}");
5353

5454
_logger.LogTrace("Create HTTPS client to connect to device");
@@ -114,7 +114,7 @@ public JobResult ProcessJob(InventoryJobConfiguration config, SubmitInventoryUpd
114114
}
115115
}
116116

117-
// Build the list of CA certificates and add to the InventoryItems object that is sent back to Command
117+
// Build the list of CA certificates and add to the InventoryItems object sent back to Command
118118
inventoryItems.AddRange(data1.CACerts.Select(
119119
c =>
120120
{
@@ -131,7 +131,7 @@ public JobResult ProcessJob(InventoryJobConfiguration config, SubmitInventoryUpd
131131
}
132132
}).Where(item => item?.Certificates != null).ToList());
133133

134-
// Build the list of client certificates and add to the InventoryItems object that is sent back to Command
134+
// Build the list of client certificates and add to the InventoryItems object sent back to Command
135135
inventoryItems.AddRange(data2.Certs.Select(
136136
c =>
137137
{

AxisIPCamera/Management.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2025 Keyfactor
1+
// Copyright 2026 Keyfactor
22
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
33
// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
44
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
@@ -258,7 +258,11 @@ private static bool IsCACertificate(string certBase64Der)
258258
byte[] certBytes = Convert.FromBase64String(certBase64Der);
259259

260260
// Create an X509 object so we can analyze the contents
261-
X509Certificate2 certToAdd = new X509Certificate2(certBytes);
261+
#if NET9_0_OR_GREATER
262+
X509Certificate2 certToAdd = X509CertificateLoader.LoadCertificate(certBytes);
263+
#else
264+
X509Certificate2 certToAdd = new X509Certificate2(certBytes);
265+
#endif
262266

263267
foreach (X509Extension ext in certToAdd.Extensions)
264268
{

AxisIPCamera/Model/Constants.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,16 +96,16 @@ public static string MapKeyType(string keyAlgorithm, string keySize)
9696
{
9797
"RSA" when keySize == "2048" => "RSA-2048",
9898
"RSA" when keySize == "4096" => "RSA-4096",
99-
"ECP" when keySize == "256" => "EC-P256",
100-
"ECP" when keySize == "384" => "EC-P384",
101-
"ECP" when keySize == "521" => "EC-P521",
99+
"ECDSA" when keySize == "256" => "EC-P256",
100+
"ECDSA" when keySize == "384" => "EC-P384",
101+
"ECDSA" when keySize == "521" => "EC-P521",
102102
_ => "UNKNOWN"
103103
};
104104
}
105105

106106
/// <summary>
107107
/// Maps the certificate usage enum values to the corresponding string values that are configured
108-
/// for the "Certificate Usage" entry parameter inside of Command. The string values *MUST* match
108+
/// for the "Certificate Usage" entry parameter for the certificate store type in Command. The string values *MUST* match
109109
/// exactly the value configured for the certificate usage entry parameter in Command.
110110
/// </summary>
111111
/// <param name="certUsageEnum"></param>

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
v1.1.0
2+
- chore(docs): Updated doctool release actions to v5
3+
- chore(build): Updated .NET target frameworks to net8.0 and net10.0
4+
- fix(odkg): Fixed incorrect mapping of ECDSA algorithm to ECP. Updated to ECDSA.
5+
- feat(odkg): Implemented alias versioning to enable reuse of existing alias names in automation processes
6+
17
v1.0.2
28
- fix(logs): Removed logging of plaintext cert store Server Password
39
- fix(keystore): Updated Keystore type to be dynamic instead of a fixed Enum to allow compatibility across different cameras/firmware

integration-manifest.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
"PrivateKeyAllowed": "Forbidden",
2828
"SupportedOperations": {
2929
"Add": true,
30-
"Create": false,
3130
"Discovery": false,
3231
"Enrollment": true,
3332
"Remove": true

0 commit comments

Comments
 (0)