|
1 | | -using System; |
| 1 | +// Copyright 2025 Keyfactor |
| 2 | +// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. |
| 3 | +// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 |
| 4 | +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, |
| 5 | +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions |
| 6 | +// and limitations under the License. |
| 7 | + |
| 8 | +using System; |
2 | 9 | using System.Text; |
3 | 10 | using System.Linq; |
4 | | -using System.Collections.Generic; |
5 | 11 | using System.Security.Cryptography.X509Certificates; |
6 | | -using Keyfactor.Logging; |
7 | | -using Keyfactor.Orchestrators.Extensions; |
8 | | -using Keyfactor.Orchestrators.Common.Enums; |
9 | | - |
10 | 12 | using Microsoft.Extensions.Logging; |
11 | | - |
12 | 13 | using Newtonsoft.Json; |
13 | 14 |
|
| 15 | +using Keyfactor.Logging; |
| 16 | +using Keyfactor.Orchestrators.Extensions; |
| 17 | +using Keyfactor.Orchestrators.Common.Enums; |
14 | 18 | using Keyfactor.Extensions.Orchestrator.AxisIPCamera.Client; |
15 | 19 | using Keyfactor.Extensions.Orchestrator.AxisIPCamera.Model; |
16 | 20 | using Keyfactor.Orchestrators.Extensions.Interfaces; |
@@ -133,7 +137,6 @@ public JobResult ProcessJob(ManagementJobConfiguration config) |
133 | 137 | } |
134 | 138 |
|
135 | 139 | // Build PEM content |
136 | | - // TODO: Add this and the logic in reenrollment to client class (consolidate) |
137 | 140 | string formattedDer = InsertLineBreaks(certBase64Der, 64); |
138 | 141 | _logger.LogDebug(($"Formatted certificate contents:\n{formattedDer}")); |
139 | 142 |
|
@@ -192,14 +195,6 @@ public JobResult ProcessJob(ManagementJobConfiguration config) |
192 | 195 |
|
193 | 196 | break; |
194 | 197 | } |
195 | | - case CertStoreOperationType.Create: |
196 | | - //OperationType == Create - Create an empty certificate store in the provided location |
197 | | - //Code logic to: |
198 | | - // 1) Connect to the orchestrated server (config.CertificateStoreDetails.ClientMachine) where the certificate store (config.CertificateStoreDetails.StorePath) will be located |
199 | | - // 2) Custom logic to first check if the store already exists and add it if not. If it already exists, implementation dependent as to how to handle - error, warning, success |
200 | | - // TODO: This is not supported operation |
201 | | - |
202 | | - break; |
203 | 198 | default: |
204 | 199 | //Invalid OperationType. Return error. Should never happen though |
205 | 200 | return new JobResult() { Result = Keyfactor.Orchestrators.Common.Enums.OrchestratorJobStatusJobResult.Failure, JobHistoryId = config.JobHistoryId, FailureMessage = $"Site {config.CertificateStoreDetails.StorePath} on server {config.CertificateStoreDetails.ClientMachine}: Unsupported operation: {config.OperationType.ToString()}" }; |
|
0 commit comments