1 write to _logger
aspire (1)
Certificates\CertificateGeneration\CertificateManager.cs (1)
1098_logger = logger;
116 references to _logger
aspire (116)
Certificates\CertificateGeneration\CertificateManager.cs (116)
1101public bool IsEnabled() => _logger.IsEnabled(LogLevel.Debug); 1105_logger.LogDebug("Listing certificates from {Location}\\{StoreName}", location, storeName); 1109_logger.LogDebug("Found certificates: {MatchingCertificates}", matchingCertificates); 1113_logger.LogDebug("Checking certificates validity"); 1117_logger.LogDebug("Valid certificates: {ValidCertificates}", validCertificates); 1121_logger.LogDebug("Invalid certificates: {InvalidCertificates}", invalidCertificates); 1125_logger.LogDebug("Finished listing certificates."); 1129_logger.LogError("An error occurred while listing the certificates: {Error}", e); 1133_logger.LogDebug("Filtered certificates: {FilteredCertificates}", filteredCertificates); 1137_logger.LogDebug("Excluded certificates: {ExcludedCertificates}", excludedCertificates); 1141_logger.LogDebug("Valid certificates: {Certificates}", certificates); 1145_logger.LogDebug("Selected certificate: {Certificate}", certificate); 1149_logger.LogDebug("No valid certificates found."); 1153_logger.LogDebug("Generating HTTPS development certificate."); 1157_logger.LogDebug("Finished generating HTTPS development certificate."); 1161_logger.LogError("An error has occurred generating the certificate: {Error}.", e); 1165_logger.LogDebug("Saving certificate '{Certificate}' to store {Location}\\{StoreName}.", certificate, location, name); 1169_logger.LogDebug("Finished saving certificate to the store."); 1173_logger.LogError("An error has occurred saving the certificate: {Error}.", e); 1177_logger.LogDebug("Saving certificate '{Certificate}' to {Path} {PrivateKey} private key.", certificate, path, includePrivateKey ? "with" : "without"); 1181_logger.LogDebug("Exporting certificate with private key but no password."); 1185_logger.LogDebug("Creating directory {Path}.", path); 1189_logger.LogError("An error has occurred while exporting the certificate: {Error}.", error); 1193_logger.LogDebug("Writing the certificate to: {Path}.", path); 1197_logger.LogError("An error has occurred while writing the certificate to disk: {Error}.", error); 1201_logger.LogDebug("Trusting the certificate to: {Certificate}.", certificate); 1205_logger.LogDebug("Finished trusting the certificate."); 1209_logger.LogError("An error has occurred while trusting the certificate: {Error}.", error); 1213_logger.LogDebug("Running the trust command {Command}.", command); 1217_logger.LogDebug("Finished running the trust command."); 1221_logger.LogWarning("An error has occurred while running the trust command: {ExitCode}.", exitCode); 1225_logger.LogDebug("Running the remove trust command for {Certificate}.", certificate); 1229_logger.LogDebug("Finished running the remove trust command."); 1233_logger.LogWarning("An error has occurred while running the remove trust command: {ExitCode}.", exitCode); 1237_logger.LogDebug("The certificate is not trusted: {Certificate}.", certificate); 1241_logger.LogDebug("Removing the certificate from the keychain {KeyChain} {Certificate}.", keyChain, certificate); 1245_logger.LogDebug("Finished removing the certificate from the keychain."); 1249_logger.LogWarning("An error has occurred while running the remove trust command: {ExitCode}.", exitCode); 1253_logger.LogDebug("Removing the certificate from the user store {Certificate}.", certificate); 1257_logger.LogDebug("Finished removing the certificate from the user store."); 1261_logger.LogError("An error has occurred while removing the certificate from the user store: {Error}.", error); 1265_logger.LogDebug("Adding certificate to the trusted root certification authority store."); 1269_logger.LogDebug("The certificate is already trusted."); 1273_logger.LogDebug("Trusting the certificate was cancelled by the user."); 1277_logger.LogDebug("Removing the certificate from the trusted root certification authority store."); 1281_logger.LogDebug("Finished removing the certificate from the trusted root certification authority store."); 1285_logger.LogDebug("The certificate was not trusted."); 1289_logger.LogDebug("Correcting the the certificate state for '{Certificate}'.", certificate); 1293_logger.LogDebug("Finished correcting the certificate state."); 1297_logger.LogError("An error has occurred while correcting the certificate state: {Error}.", error); 1301_logger.LogDebug("Importing the certificate {Certificate} to the keychain '{Keychain}'.", certificate, keychain); 1305_logger.LogDebug("Finished importing the certificate to the keychain."); 1309_logger.LogError("An error has occurred while importing the certificate to the keychain: {ExitCode}, {Output}", exitCode, output); 1313_logger.LogDebug("Writing the certificate to: {Path}.", path); 1317_logger.LogError("An error has occurred while writing the certificate to disk: {Error}.", error); 1321_logger.LogError("The file '{CertificatePath}' does not exist.", certificatePath); 1325_logger.LogError("One or more HTTPS certificates exist '{CertificateDescription}'.", certificateDescription); 1329_logger.LogDebug("Loading certificate from path '{CertificatePath}'.", certificatePath); 1333_logger.LogDebug("The certificate '{Description}' has been loaded successfully.", description); 1337_logger.LogError("An error has occurred while loading the certificate from disk: {Error}.", error); 1341_logger.LogError("The provided certificate '{Description}' is not a valid ASP.NET Core HTTPS development certificate.", description); 1345_logger.LogDebug("The certificate is already trusted."); 1349_logger.LogDebug("Saving the certificate {Certificate} to the user profile folder '{Directory}'.", certificate, directory); 1353_logger.LogDebug("Finished saving the certificate to the user profile folder."); 1357_logger.LogError("An error has occurred while saving certificate '{CertificateThumbprint}' in the user profile folder: {ErrorMessage}.", certificateThumbprint, errorMessage); 1361_logger.LogError("An error has occurred while removing certificate '{CertificateThumbprint}' from the user profile folder: {ErrorMessage}.", certificateThumbprint, errorMessage); 1365_logger.LogError("The file '{Path}' is not a valid certificate.", path); 1369_logger.LogWarning("The on-disk store directory was not found."); 1373_logger.LogDebug("Reading OpenSSL trusted certificates location from {NssDbOverrideVariableName}.", nssDbOverrideVariableName); 1377_logger.LogDebug("Reading NSS database locations from {EnvironmentVariable}.", environmentVariable); 1381_logger.LogWarning("The NSS database '{NssDb}' provided via {EnvironmentVariable} does not exist.", nssDb, environmentVariable); 1385_logger.LogWarning("The certificate is not trusted by .NET. This will likely affect System.Net.Http.HttpClient."); 1389_logger.LogWarning("The certificate is not trusted by OpenSSL. Ensure that the {EnvVarName} environment variable is set correctly.", envVarName); 1393_logger.LogWarning("The certificate is not trusted in the NSS database in '{Path}'. This will likely affect the {Browser} family of browsers.", path, browser); 1397_logger.LogDebug("Home directory '{HomeDirectory}' does not exist. Unable to discover NSS databases for user '{Username}'. This will likely affect browsers.", homeDirectory, username); 1401_logger.LogDebug("OpenSSL reported its directory in an unexpected format."); 1405_logger.LogDebug("Unable to determine the OpenSSL directory."); 1409_logger.LogDebug("Unable to determine the OpenSSL directory: {ExceptionMessage}.", exceptionMessage); 1413_logger.LogError("Unable to compute the hash of certificate {CertificatePath}. OpenSSL trust is likely in an inconsistent state.", certificatePath); 1417_logger.LogError("Unable to compute the certificate hash: {CertificatePath}. OpenSSL trust is likely in an inconsistent state. {ExceptionMessage}", certificatePath, exceptionMessage); 1421_logger.LogError("Unable to update certificate '{FullName}' in the OpenSSL trusted certificate hash collection - {MaxHashCollisions} certificates have the hash {Hash}.", fullName, maxHashCollisions, hash); 1425_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); 1429_logger.LogWarning("Failed to trust the certificate in .NET: {ExceptionMessage}.", exceptionMessage); 1433_logger.LogDebug("Trusted the certificate in .NET."); 1437_logger.LogWarning("Clients that validate certificate trust using OpenSSL will not trust the certificate."); 1441_logger.LogDebug("Trusted the certificate in OpenSSL."); 1445_logger.LogWarning("Failed to trust the certificate in the NSS database in '{Path}'. This will likely affect the {Browser} family of browsers.", path, browser); 1449_logger.LogDebug("Trusted the certificate in the NSS database in '{Path}'.", path); 1453_logger.LogWarning("Failed to untrust the certificate in .NET: {ExceptionMessage}.", exceptionMessage); 1457_logger.LogWarning("Failed to untrust the certificate in OpenSSL."); 1461_logger.LogDebug("Untrusted the certificate in OpenSSL."); 1465_logger.LogWarning("Failed to remove the certificate from the NSS database in '{Path}'.", path); 1469_logger.LogDebug("Removed the certificate from the NSS database in '{Path}'.", path); 1473_logger.LogWarning("The certificate is only partially trusted - some clients will not accept it."); 1477_logger.LogWarning("Failed to look up the certificate in the NSS database in '{Path}': {ExceptionMessage}.", path, exceptionMessage); 1481_logger.LogWarning("Failed to add the certificate to the NSS database in '{Path}': {ExceptionMessage}.", path, exceptionMessage); 1485_logger.LogWarning("Failed to remove the certificate from the NSS database in '{Path}': {ExceptionMessage}.", path, exceptionMessage); 1489_logger.LogWarning("Failed to find the Firefox profiles in directory '{FirefoxDirectory}': {Message}.", firefoxDirectory, message); 1493_logger.LogDebug("No Firefox profiles found in directory '{FirefoxDirectory}'.", firefoxDirectory); 1497_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); 1501_logger.LogWarning("The {OpenSslCertDirectoryOverrideVariableName} environment variable is set but will not be consumed while checking trust.", openSslCertDirectoryOverrideVariableName); 1505_logger.LogWarning("The {OpenSslCommand} command is unavailable. It is required for updating certificate trust in OpenSSL.", openSslCommand); 1509_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); 1513_logger.LogDebug("Untrusting the certificate in OpenSSL was skipped since '{CertPath}' does not exist.", certPath); 1517_logger.LogWarning("Failed to delete certificate file '{CertPath}': {ExceptionMessage}.", certPath, exceptionMessage); 1521_logger.LogError("Unable to export the certificate since '{CertPath}' already exists. Please remove it.", certPath); 1525_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); 1529_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); 1533_logger.LogWarning("Directory '{DirectoryPath}' may be readable by other users.", directoryPath); 1537_logger.LogDebug("The certificate directory '{CertDir}' is already included in the {EnvVarName} environment variable.", certDir, envVarName); 1541_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); 1545_logger.LogDebug("Successfully trusted the certificate in the Windows certificate store via WSL."); 1549_logger.LogWarning("Failed to trust the certificate in the Windows certificate store via WSL."); 1553_logger.LogWarning("Failed to trust the certificate in the Windows certificate store via WSL: {ExceptionMessage}.", exceptionMessage); 1557_logger.LogDebug("Meets minimum version certificates: {MeetsMinimumVersionCertificates}", meetsMinimumVersionCertificates); 1561_logger.LogDebug("Below minimum version certificates: {BelowMinimumVersionCertificates}", belowMinimumVersionCertificates);