1 write to _logger
aspire (1)
Certificates\CertificateGeneration\CertificateManager.cs (1)
1099
_logger
= logger;
116 references to _logger
aspire (116)
Certificates\CertificateGeneration\CertificateManager.cs (116)
1102
public bool IsEnabled() =>
_logger
.IsEnabled(LogLevel.Debug);
1106
_logger
.LogDebug("Listing certificates from {Location}\\{StoreName}", location, storeName);
1110
_logger
.LogDebug("Found certificates: {MatchingCertificates}", matchingCertificates);
1114
_logger
.LogDebug("Checking certificates validity");
1118
_logger
.LogDebug("Valid certificates: {ValidCertificates}", validCertificates);
1122
_logger
.LogDebug("Invalid certificates: {InvalidCertificates}", invalidCertificates);
1126
_logger
.LogDebug("Finished listing certificates.");
1130
_logger
.LogError("An error occurred while listing the certificates: {Error}", e);
1134
_logger
.LogDebug("Filtered certificates: {FilteredCertificates}", filteredCertificates);
1138
_logger
.LogDebug("Excluded certificates: {ExcludedCertificates}", excludedCertificates);
1142
_logger
.LogDebug("Valid certificates: {Certificates}", certificates);
1146
_logger
.LogDebug("Selected certificate: {Certificate}", certificate);
1150
_logger
.LogDebug("No valid certificates found.");
1154
_logger
.LogDebug("Generating HTTPS development certificate.");
1158
_logger
.LogDebug("Finished generating HTTPS development certificate.");
1162
_logger
.LogError("An error has occurred generating the certificate: {Error}.", e);
1166
_logger
.LogDebug("Saving certificate '{Certificate}' to store {Location}\\{StoreName}.", certificate, location, name);
1170
_logger
.LogDebug("Finished saving certificate to the store.");
1174
_logger
.LogError("An error has occurred saving the certificate: {Error}.", e);
1178
_logger
.LogDebug("Saving certificate '{Certificate}' to {Path} {PrivateKey} private key.", certificate, path, includePrivateKey ? "with" : "without");
1182
_logger
.LogDebug("Exporting certificate with private key but no password.");
1186
_logger
.LogDebug("Creating directory {Path}.", path);
1190
_logger
.LogError("An error has occurred while exporting the certificate: {Error}.", error);
1194
_logger
.LogDebug("Writing the certificate to: {Path}.", path);
1198
_logger
.LogError("An error has occurred while writing the certificate to disk: {Error}.", error);
1202
_logger
.LogDebug("Trusting the certificate to: {Certificate}.", certificate);
1206
_logger
.LogDebug("Finished trusting the certificate.");
1210
_logger
.LogError("An error has occurred while trusting the certificate: {Error}.", error);
1214
_logger
.LogDebug("Running the trust command {Command}.", command);
1218
_logger
.LogDebug("Finished running the trust command.");
1222
_logger
.LogWarning("An error has occurred while running the trust command: {ExitCode}.", exitCode);
1226
_logger
.LogDebug("Running the remove trust command for {Certificate}.", certificate);
1230
_logger
.LogDebug("Finished running the remove trust command.");
1234
_logger
.LogWarning("An error has occurred while running the remove trust command: {ExitCode}.", exitCode);
1238
_logger
.LogDebug("The certificate is not trusted: {Certificate}.", certificate);
1242
_logger
.LogDebug("Removing the certificate from the keychain {KeyChain} {Certificate}.", keyChain, certificate);
1246
_logger
.LogDebug("Finished removing the certificate from the keychain.");
1250
_logger
.LogWarning("An error has occurred while running the remove trust command: {ExitCode}.", exitCode);
1254
_logger
.LogDebug("Removing the certificate from the user store {Certificate}.", certificate);
1258
_logger
.LogDebug("Finished removing the certificate from the user store.");
1262
_logger
.LogError("An error has occurred while removing the certificate from the user store: {Error}.", error);
1266
_logger
.LogDebug("Adding certificate to the trusted root certification authority store.");
1270
_logger
.LogDebug("The certificate is already trusted.");
1274
_logger
.LogDebug("Trusting the certificate was cancelled by the user.");
1278
_logger
.LogDebug("Removing the certificate from the trusted root certification authority store.");
1282
_logger
.LogDebug("Finished removing the certificate from the trusted root certification authority store.");
1286
_logger
.LogDebug("The certificate was not trusted.");
1290
_logger
.LogDebug("Correcting the the certificate state for '{Certificate}'.", certificate);
1294
_logger
.LogDebug("Finished correcting the certificate state.");
1298
_logger
.LogError("An error has occurred while correcting the certificate state: {Error}.", error);
1302
_logger
.LogDebug("Importing the certificate {Certificate} to the keychain '{Keychain}'.", certificate, keychain);
1306
_logger
.LogDebug("Finished importing the certificate to the keychain.");
1310
_logger
.LogError("An error has occurred while importing the certificate to the keychain: {ExitCode}, {Output}", exitCode, output);
1314
_logger
.LogDebug("Writing the certificate to: {Path}.", path);
1318
_logger
.LogError("An error has occurred while writing the certificate to disk: {Error}.", error);
1322
_logger
.LogError("The file '{CertificatePath}' does not exist.", certificatePath);
1326
_logger
.LogError("One or more HTTPS certificates exist '{CertificateDescription}'.", certificateDescription);
1330
_logger
.LogDebug("Loading certificate from path '{CertificatePath}'.", certificatePath);
1334
_logger
.LogDebug("The certificate '{Description}' has been loaded successfully.", description);
1338
_logger
.LogError("An error has occurred while loading the certificate from disk: {Error}.", error);
1342
_logger
.LogError("The provided certificate '{Description}' is not a valid ASP.NET Core HTTPS development certificate.", description);
1346
_logger
.LogDebug("The certificate is already trusted.");
1350
_logger
.LogDebug("Saving the certificate {Certificate} to the user profile folder '{Directory}'.", certificate, directory);
1354
_logger
.LogDebug("Finished saving the certificate to the user profile folder.");
1358
_logger
.LogError("An error has occurred while saving certificate '{CertificateThumbprint}' in the user profile folder: {ErrorMessage}.", certificateThumbprint, errorMessage);
1362
_logger
.LogError("An error has occurred while removing certificate '{CertificateThumbprint}' from the user profile folder: {ErrorMessage}.", certificateThumbprint, errorMessage);
1366
_logger
.LogError("The file '{Path}' is not a valid certificate.", path);
1370
_logger
.LogWarning("The on-disk store directory was not found.");
1374
_logger
.LogDebug("Reading OpenSSL trusted certificates location from {NssDbOverrideVariableName}.", nssDbOverrideVariableName);
1378
_logger
.LogDebug("Reading NSS database locations from {Source}.", source);
1382
_logger
.LogWarning("The NSS database '{NssDb}' provided via {Source} does not exist.", nssDb, source);
1386
_logger
.LogWarning("The certificate is not trusted by .NET. This will likely affect System.Net.Http.HttpClient.");
1390
_logger
.LogWarning("The certificate is not trusted by OpenSSL. Ensure that the {EnvVarName} environment variable is set correctly.", envVarName);
1394
_logger
.LogWarning("The certificate is not trusted in the NSS database in '{Path}'. This will likely affect the {Browser} family of browsers.", path, browser);
1398
_logger
.LogDebug("Home directory '{HomeDirectory}' does not exist. Unable to discover NSS databases for user '{Username}'. This will likely affect browsers.", homeDirectory, username);
1402
_logger
.LogDebug("OpenSSL reported its directory in an unexpected format.");
1406
_logger
.LogDebug("Unable to determine the OpenSSL directory.");
1410
_logger
.LogDebug("Unable to determine the OpenSSL directory: {ExceptionMessage}.", exceptionMessage);
1414
_logger
.LogError("Unable to compute the hash of certificate {CertificatePath}. OpenSSL trust is likely in an inconsistent state.", certificatePath);
1418
_logger
.LogError("Unable to compute the certificate hash: {CertificatePath}. OpenSSL trust is likely in an inconsistent state. {ExceptionMessage}", certificatePath, exceptionMessage);
1422
_logger
.LogError("Unable to update certificate '{FullName}' in the OpenSSL trusted certificate hash collection - {MaxHashCollisions} certificates have the hash {Hash}.", fullName, maxHashCollisions, hash);
1426
_logger
.LogError("Unable to update the OpenSSL trusted certificate hash collection: {ExceptionMessage}. Manually rehashing may help. See https://aka.ms/dev-certs-trust for more information.", exceptionMessage);
1430
_logger
.LogWarning("Failed to trust the certificate in .NET: {ExceptionMessage}.", exceptionMessage);
1434
_logger
.LogDebug("Trusted the certificate in .NET.");
1438
_logger
.LogWarning("Clients that validate certificate trust using OpenSSL will not trust the certificate.");
1442
_logger
.LogDebug("Trusted the certificate in OpenSSL.");
1446
_logger
.LogWarning("Failed to trust the certificate in the NSS database in '{Path}'. This will likely affect the {Browser} family of browsers.", path, browser);
1450
_logger
.LogDebug("Trusted the certificate in the NSS database in '{Path}'.", path);
1454
_logger
.LogWarning("Failed to untrust the certificate in .NET: {ExceptionMessage}.", exceptionMessage);
1458
_logger
.LogWarning("Failed to untrust the certificate in OpenSSL.");
1462
_logger
.LogDebug("Untrusted the certificate in OpenSSL.");
1466
_logger
.LogWarning("Failed to remove the certificate from the NSS database in '{Path}'.", path);
1470
_logger
.LogDebug("Removed the certificate from the NSS database in '{Path}'.", path);
1474
_logger
.LogWarning("The certificate is only partially trusted - some clients will not accept it.");
1478
_logger
.LogWarning("Failed to look up the certificate in the NSS database in '{Path}': {ExceptionMessage}.", path, exceptionMessage);
1482
_logger
.LogWarning("Failed to add the certificate to the NSS database in '{Path}': {ExceptionMessage}.", path, exceptionMessage);
1486
_logger
.LogWarning("Failed to remove the certificate from the NSS database in '{Path}': {ExceptionMessage}.", path, exceptionMessage);
1490
_logger
.LogWarning("Failed to find the Firefox profiles in directory '{FirefoxDirectory}': {Message}.", firefoxDirectory, message);
1494
_logger
.LogDebug("No Firefox profiles found in directory '{FirefoxDirectory}'.", firefoxDirectory);
1498
_logger
.LogWarning("Failed to trust the certificate in the NSS database in '{Path}'. This will likely affect the {Browser} family of browsers. This likely indicates that the database already contains an entry for the certificate under a different name. Please remove it and try again.", path, browser);
1502
_logger
.LogWarning("The {OpenSslCertDirectoryOverrideVariableName} environment variable is set but will not be consumed while checking trust.", openSslCertDirectoryOverrideVariableName);
1506
_logger
.LogWarning("The {OpenSslCommand} command is unavailable. It is required for updating certificate trust in OpenSSL.", openSslCommand);
1510
_logger
.LogWarning("The {CertUtilCommand} command is unavailable. It is required for querying and updating NSS databases, which are chiefly used to trust certificates in browsers.", certUtilCommand);
1514
_logger
.LogDebug("Untrusting the certificate in OpenSSL was skipped since '{CertPath}' does not exist.", certPath);
1518
_logger
.LogWarning("Failed to delete certificate file '{CertPath}': {ExceptionMessage}.", certPath, exceptionMessage);
1522
_logger
.LogError("Unable to export the certificate since '{CertPath}' already exists. Please remove it.", certPath);
1526
_logger
.LogInformation("For OpenSSL trust to take effect, '{CertDir}' must be listed in the {EnvVarName} environment variable. For example, `export {EnvVarName}=\"{CertDir}:{OpenSslDir}\"`. See https://aka.ms/dev-certs-trust for more information.", certDir, envVarName, envVarName, certDir, openSslDir);
1530
_logger
.LogInformation("For OpenSSL trust to take effect, '{CertDir}' must be listed in the {EnvVarName} environment variable. See https://aka.ms/dev-certs-trust for more information.", certDir, envVarName);
1534
_logger
.LogWarning("Directory '{DirectoryPath}' may be readable by other users.", directoryPath);
1538
_logger
.LogDebug("The certificate directory '{CertDir}' is already included in the {EnvVarName} environment variable.", certDir, envVarName);
1542
_logger
.LogInformation("For OpenSSL trust to take effect, '{CertDir}' must be listed in the {EnvVarName} environment variable. For example, `export {EnvVarName}=\"{CertDir}:${EnvVarName}\"`. See https://aka.ms/dev-certs-trust for more information.", certDir, envVarName, envVarName, certDir, envVarName);
1546
_logger
.LogDebug("Successfully trusted the certificate in the Windows certificate store via WSL.");
1550
_logger
.LogWarning("Failed to trust the certificate in the Windows certificate store via WSL.");
1554
_logger
.LogWarning("Failed to trust the certificate in the Windows certificate store via WSL: {ExceptionMessage}.", exceptionMessage);
1558
_logger
.LogDebug("Meets minimum version certificates: {MeetsMinimumVersionCertificates}", meetsMinimumVersionCertificates);
1562
_logger
.LogDebug("Below minimum version certificates: {BelowMinimumVersionCertificates}", belowMinimumVersionCertificates);