Skip to content

Commit 340cfc6

Browse files
Nirjan Chapagainnchapagain001
authored andcommitted
Adding doc
1 parent 18ccb60 commit 340cfc6

3 files changed

Lines changed: 3 additions & 20 deletions

File tree

src/VirtualClient/VirtualClient.Core/KeyVaultManager.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,8 @@ public async Task<X509Certificate2> GetCertificateAsync(
220220

221221
var credentials = ((DependencyKeyVaultStore)this.StoreDescription).Credentials;
222222

223-
CertificateClient certificateClient = this.CreateCertificateClient(vaultUri, credentials);
224-
SecretClient secretClient = this.CreateSecretClient(vaultUri, credentials);
223+
CertificateClient certificateClient = this.CreateCertificateClient(vaultUri, credentials); // For public cert.
224+
SecretClient secretClient = this.CreateSecretClient(vaultUri, credentials); // For private cert (PFX)
225225

226226
try
227227
{

src/VirtualClient/VirtualClient.Dependencies/CertificateInstallation.cs

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,6 @@ protected override async Task ExecuteAsync(EventContext telemetryContext, Cancel
151151

152152
string certificatePath = this.Combine(this.CertificateDownloadDir, certificateFileName);
153153

154-
// Delete existing certificate file
155154
if (this.fileSystem.File.Exists(certificatePath))
156155
{
157156
this.fileSystem.File.Delete(certificatePath);
@@ -279,22 +278,5 @@ protected IKeyVaultManager GetKeyVaultManager()
279278
$"Either valid --KeyVault or --Token or --TokenPath must be passed in order to set up authentication with Key Vault.");
280279
}
281280
}
282-
283-
/// <summary>
284-
/// Tries to get certificate data, returning null if an exception occurs.
285-
/// </summary>
286-
private byte[] TryGetCertData(Func<byte[]> getCertData)
287-
{
288-
try
289-
{
290-
return getCertData();
291-
}
292-
catch (Exception exc)
293-
{
294-
Console.WriteLine(exc.ToString());
295-
Console.WriteLine("\n\n\n\n=================================================================================\n");
296-
return null;
297-
}
298-
}
299281
}
300282
}

website/docs/guides/0010-command-line.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ The following tables describe the various subcommands that are supported by the
155155
| --key-vault, --kv=\<keyVaultUri\> | No* | uri | Azure Key Vault URI to source the certificate from (e.g. `https://myvault.vault.azure.net/`). Required when doing **certificate bootstrapping**. |
156156
| --token, --access-token=\<accessToken\> | No | string | Optional access token used to authenticate to Key Vault when installing certificates. If not provided, Virtual Client uses the default Azure credential flow (e.g. Azure CLI, Managed Identity, etc.). |
157157
| --tenant-Id, --tid=\<tenantId\> | No | string | Azure Active Directory tenant ID used for authentication. |
158+
| --certificateDownloadDir | No | string | Directory path where downloaded certificates can also be stored. |
158159
| --c, --client-id=\<id\> | No | string/text | Identifier to uniquely identify the instance (telemetry correlation). |
159160
| --clean=\<target,target...\> | No | string | Perform an initial cleanup (logs/packages/state/temp/all). |
160161
| --cs, --content, --content-store=\<connection\> | No | string/connection string/SAS | Storage connection for uploading files/content (e.g. logs). |

0 commit comments

Comments
 (0)