1 write to _logger
aspire (1)
Certificates\CertificateGeneration\CertificateManager.cs (1)
1040
_logger
= logger;
116 references to _logger
aspire (116)
Certificates\CertificateGeneration\CertificateManager.cs (116)
1043
public bool IsEnabled() =>
_logger
.IsEnabled(LogLevel.Debug);
1047
_logger
.LogDebug("Listing certificates from {Location}\\{StoreName}", location, storeName);
1051
_logger
.LogDebug("Found certificates: {MatchingCertificates}", matchingCertificates);
1055
_logger
.LogDebug("Checking certificates validity");
1059
_logger
.LogDebug("Valid certificates: {ValidCertificates}", validCertificates);
1063
_logger
.LogDebug("Invalid certificates: {InvalidCertificates}", invalidCertificates);
1067
_logger
.LogDebug("Finished listing certificates.");
1071
_logger
.LogError("An error occurred while listing the certificates: {Error}", e);
1075
_logger
.LogDebug("Filtered certificates: {FilteredCertificates}", filteredCertificates);
1079
_logger
.LogDebug("Excluded certificates: {ExcludedCertificates}", excludedCertificates);
1083
_logger
.LogDebug("Valid certificates: {Certificates}", certificates);
1087
_logger
.LogDebug("Selected certificate: {Certificate}", certificate);
1091
_logger
.LogDebug("No valid certificates found.");
1095
_logger
.LogDebug("Generating HTTPS development certificate.");
1099
_logger
.LogDebug("Finished generating HTTPS development certificate.");
1103
_logger
.LogError("An error has occurred generating the certificate: {Error}.", e);
1107
_logger
.LogDebug("Saving certificate '{Certificate}' to store {Location}\\{StoreName}.", certificate, location, name);
1111
_logger
.LogDebug("Finished saving certificate to the store.");
1115
_logger
.LogError("An error has occurred saving the certificate: {Error}.", e);
1119
_logger
.LogDebug("Saving certificate '{Certificate}' to {Path} {PrivateKey} private key.", certificate, path, includePrivateKey ? "with" : "without");
1123
_logger
.LogDebug("Exporting certificate with private key but no password.");
1127
_logger
.LogDebug("Creating directory {Path}.", path);
1131
_logger
.LogError("An error has occurred while exporting the certificate: {Error}.", error);
1135
_logger
.LogDebug("Writing the certificate to: {Path}.", path);
1139
_logger
.LogError("An error has occurred while writing the certificate to disk: {Error}.", error);
1143
_logger
.LogDebug("Trusting the certificate to: {Certificate}.", certificate);
1147
_logger
.LogDebug("Finished trusting the certificate.");
1151
_logger
.LogError("An error has occurred while trusting the certificate: {Error}.", error);
1155
_logger
.LogDebug("Running the trust command {Command}.", command);
1159
_logger
.LogDebug("Finished running the trust command.");
1163
_logger
.LogWarning("An error has occurred while running the trust command: {ExitCode}.", exitCode);
1167
_logger
.LogDebug("Running the remove trust command for {Certificate}.", certificate);
1171
_logger
.LogDebug("Finished running the remove trust command.");
1175
_logger
.LogWarning("An error has occurred while running the remove trust command: {ExitCode}.", exitCode);
1179
_logger
.LogDebug("The certificate is not trusted: {Certificate}.", certificate);
1183
_logger
.LogDebug("Removing the certificate from the keychain {KeyChain} {Certificate}.", keyChain, certificate);
1187
_logger
.LogDebug("Finished removing the certificate from the keychain.");
1191
_logger
.LogWarning("An error has occurred while running the remove trust command: {ExitCode}.", exitCode);
1195
_logger
.LogDebug("Removing the certificate from the user store {Certificate}.", certificate);
1199
_logger
.LogDebug("Finished removing the certificate from the user store.");
1203
_logger
.LogError("An error has occurred while removing the certificate from the user store: {Error}.", error);
1207
_logger
.LogDebug("Adding certificate to the trusted root certification authority store.");
1211
_logger
.LogDebug("The certificate is already trusted.");
1215
_logger
.LogDebug("Trusting the certificate was cancelled by the user.");
1219
_logger
.LogDebug("Removing the certificate from the trusted root certification authority store.");
1223
_logger
.LogDebug("Finished removing the certificate from the trusted root certification authority store.");
1227
_logger
.LogDebug("The certificate was not trusted.");
1231
_logger
.LogDebug("Correcting the the certificate state for '{Certificate}'.", certificate);
1235
_logger
.LogDebug("Finished correcting the certificate state.");
1239
_logger
.LogError("An error has occurred while correcting the certificate state: {Error}.", error);
1243
_logger
.LogDebug("Importing the certificate {Certificate} to the keychain '{Keychain}'.", certificate, keychain);
1247
_logger
.LogDebug("Finished importing the certificate to the keychain.");
1251
_logger
.LogError("An error has occurred while importing the certificate to the keychain: {ExitCode}, {Output}", exitCode, output);
1255
_logger
.LogDebug("Writing the certificate to: {Path}.", path);
1259
_logger
.LogError("An error has occurred while writing the certificate to disk: {Error}.", error);
1263
_logger
.LogError("The file '{CertificatePath}' does not exist.", certificatePath);
1267
_logger
.LogError("One or more HTTPS certificates exist '{CertificateDescription}'.", certificateDescription);
1271
_logger
.LogDebug("Loading certificate from path '{CertificatePath}'.", certificatePath);
1275
_logger
.LogDebug("The certificate '{Description}' has been loaded successfully.", description);
1279
_logger
.LogError("An error has occurred while loading the certificate from disk: {Error}.", error);
1283
_logger
.LogError("The provided certificate '{Description}' is not a valid ASP.NET Core HTTPS development certificate.", description);
1287
_logger
.LogDebug("The certificate is already trusted.");
1291
_logger
.LogDebug("Saving the certificate {Certificate} to the user profile folder '{Directory}'.", certificate, directory);
1295
_logger
.LogDebug("Finished saving the certificate to the user profile folder.");
1299
_logger
.LogError("An error has occurred while saving certificate '{CertificateThumbprint}' in the user profile folder: {ErrorMessage}.", certificateThumbprint, errorMessage);
1303
_logger
.LogError("An error has occurred while removing certificate '{CertificateThumbprint}' from the user profile folder: {ErrorMessage}.", certificateThumbprint, errorMessage);
1307
_logger
.LogError("The file '{Path}' is not a valid certificate.", path);
1311
_logger
.LogWarning("The on-disk store directory was not found.");
1315
_logger
.LogDebug("Reading OpenSSL trusted certificates location from {NssDbOverrideVariableName}.", nssDbOverrideVariableName);
1319
_logger
.LogDebug("Reading NSS database locations from {Source}.", source);
1323
_logger
.LogWarning("The NSS database '{NssDb}' provided via {Source} does not exist.", nssDb, source);
1327
_logger
.LogWarning("The certificate is not trusted by .NET. This will likely affect System.Net.Http.HttpClient.");
1331
_logger
.LogWarning("The certificate is not trusted by OpenSSL. Ensure that the {EnvVarName} environment variable is set correctly.", envVarName);
1335
_logger
.LogWarning("The certificate is not trusted in the NSS database in '{Path}'. This will likely affect the {Browser} family of browsers.", path, browser);
1339
_logger
.LogDebug("Home directory '{HomeDirectory}' does not exist. Unable to discover NSS databases for user '{Username}'. This will likely affect browsers.", homeDirectory, username);
1343
_logger
.LogDebug("OpenSSL reported its directory in an unexpected format.");
1347
_logger
.LogDebug("Unable to determine the OpenSSL directory.");
1351
_logger
.LogDebug("Unable to determine the OpenSSL directory: {ExceptionMessage}.", exceptionMessage);
1355
_logger
.LogError("Unable to compute the hash of certificate {CertificatePath}. OpenSSL trust is likely in an inconsistent state.", certificatePath);
1359
_logger
.LogError("Unable to compute the certificate hash: {CertificatePath}. OpenSSL trust is likely in an inconsistent state. {ExceptionMessage}", certificatePath, exceptionMessage);
1363
_logger
.LogError("Unable to update certificate '{FullName}' in the OpenSSL trusted certificate hash collection - {MaxHashCollisions} certificates have the hash {Hash}.", fullName, maxHashCollisions, hash);
1367
_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);
1371
_logger
.LogWarning("Failed to trust the certificate in .NET: {ExceptionMessage}.", exceptionMessage);
1375
_logger
.LogDebug("Trusted the certificate in .NET.");
1379
_logger
.LogWarning("Clients that validate certificate trust using OpenSSL will not trust the certificate.");
1383
_logger
.LogDebug("Trusted the certificate in OpenSSL.");
1387
_logger
.LogWarning("Failed to trust the certificate in the NSS database in '{Path}'. This will likely affect the {Browser} family of browsers.", path, browser);
1391
_logger
.LogDebug("Trusted the certificate in the NSS database in '{Path}'.", path);
1395
_logger
.LogWarning("Failed to untrust the certificate in .NET: {ExceptionMessage}.", exceptionMessage);
1399
_logger
.LogWarning("Failed to untrust the certificate in OpenSSL.");
1403
_logger
.LogDebug("Untrusted the certificate in OpenSSL.");
1407
_logger
.LogWarning("Failed to remove the certificate from the NSS database in '{Path}'.", path);
1411
_logger
.LogDebug("Removed the certificate from the NSS database in '{Path}'.", path);
1415
_logger
.LogWarning("The certificate is only partially trusted - some clients will not accept it.");
1419
_logger
.LogWarning("Failed to look up the certificate in the NSS database in '{Path}': {ExceptionMessage}.", path, exceptionMessage);
1423
_logger
.LogWarning("Failed to add the certificate to the NSS database in '{Path}': {ExceptionMessage}.", path, exceptionMessage);
1427
_logger
.LogWarning("Failed to remove the certificate from the NSS database in '{Path}': {ExceptionMessage}.", path, exceptionMessage);
1431
_logger
.LogWarning("Failed to find the Firefox profiles in directory '{FirefoxDirectory}': {Message}.", firefoxDirectory, message);
1435
_logger
.LogDebug("No Firefox profiles found in directory '{FirefoxDirectory}'.", firefoxDirectory);
1439
_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);
1443
_logger
.LogWarning("The {OpenSslCertDirectoryOverrideVariableName} environment variable is set but will not be consumed while checking trust.", openSslCertDirectoryOverrideVariableName);
1447
_logger
.LogWarning("The {OpenSslCommand} command is unavailable. It is required for updating certificate trust in OpenSSL.", openSslCommand);
1451
_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);
1455
_logger
.LogDebug("Untrusting the certificate in OpenSSL was skipped since '{CertPath}' does not exist.", certPath);
1459
_logger
.LogWarning("Failed to delete certificate file '{CertPath}': {ExceptionMessage}.", certPath, exceptionMessage);
1463
_logger
.LogError("Unable to export the certificate since '{CertPath}' already exists. Please remove it.", certPath);
1467
_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);
1471
_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);
1475
_logger
.LogWarning("Directory '{DirectoryPath}' may be readable by other users.", directoryPath);
1479
_logger
.LogDebug("The certificate directory '{CertDir}' is already included in the {EnvVarName} environment variable.", certDir, envVarName);
1483
_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);
1487
_logger
.LogDebug("Successfully trusted the certificate in the Windows certificate store via WSL.");
1491
_logger
.LogWarning("Failed to trust the certificate in the Windows certificate store via WSL.");
1495
_logger
.LogWarning("Failed to trust the certificate in the Windows certificate store via WSL: {ExceptionMessage}.", exceptionMessage);
1499
_logger
.LogDebug("Meets minimum version certificates: {MeetsMinimumVersionCertificates}", meetsMinimumVersionCertificates);
1503
_logger
.LogDebug("Below minimum version certificates: {BelowMinimumVersionCertificates}", belowMinimumVersionCertificates);