1 write to _logger
aspire (1)
Certificates\CertificateGeneration\CertificateManager.cs (1)
1097_logger = logger;
116 references to _logger
aspire (116)
Certificates\CertificateGeneration\CertificateManager.cs (116)
1100public bool IsEnabled() => _logger.IsEnabled(LogLevel.Debug); 1104_logger.LogDebug("Listing certificates from {Location}\\{StoreName}", location, storeName); 1108_logger.LogDebug("Found certificates: {MatchingCertificates}", matchingCertificates); 1112_logger.LogDebug("Checking certificates validity"); 1116_logger.LogDebug("Valid certificates: {ValidCertificates}", validCertificates); 1120_logger.LogDebug("Invalid certificates: {InvalidCertificates}", invalidCertificates); 1124_logger.LogDebug("Finished listing certificates."); 1128_logger.LogError("An error occurred while listing the certificates: {Error}", e); 1132_logger.LogDebug("Filtered certificates: {FilteredCertificates}", filteredCertificates); 1136_logger.LogDebug("Excluded certificates: {ExcludedCertificates}", excludedCertificates); 1140_logger.LogDebug("Valid certificates: {Certificates}", certificates); 1144_logger.LogDebug("Selected certificate: {Certificate}", certificate); 1148_logger.LogDebug("No valid certificates found."); 1152_logger.LogDebug("Generating HTTPS development certificate."); 1156_logger.LogDebug("Finished generating HTTPS development certificate."); 1160_logger.LogError("An error has occurred generating the certificate: {Error}.", e); 1164_logger.LogDebug("Saving certificate '{Certificate}' to store {Location}\\{StoreName}.", certificate, location, name); 1168_logger.LogDebug("Finished saving certificate to the store."); 1172_logger.LogError("An error has occurred saving the certificate: {Error}.", e); 1176_logger.LogDebug("Saving certificate '{Certificate}' to {Path} {PrivateKey} private key.", certificate, path, includePrivateKey ? "with" : "without"); 1180_logger.LogDebug("Exporting certificate with private key but no password."); 1184_logger.LogDebug("Creating directory {Path}.", path); 1188_logger.LogError("An error has occurred while exporting the certificate: {Error}.", error); 1192_logger.LogDebug("Writing the certificate to: {Path}.", path); 1196_logger.LogError("An error has occurred while writing the certificate to disk: {Error}.", error); 1200_logger.LogDebug("Trusting the certificate to: {Certificate}.", certificate); 1204_logger.LogDebug("Finished trusting the certificate."); 1208_logger.LogError("An error has occurred while trusting the certificate: {Error}.", error); 1212_logger.LogDebug("Running the trust command {Command}.", command); 1216_logger.LogDebug("Finished running the trust command."); 1220_logger.LogWarning("An error has occurred while running the trust command: {ExitCode}.", exitCode); 1224_logger.LogDebug("Running the remove trust command for {Certificate}.", certificate); 1228_logger.LogDebug("Finished running the remove trust command."); 1232_logger.LogWarning("An error has occurred while running the remove trust command: {ExitCode}.", exitCode); 1236_logger.LogDebug("The certificate is not trusted: {Certificate}.", certificate); 1240_logger.LogDebug("Removing the certificate from the keychain {KeyChain} {Certificate}.", keyChain, certificate); 1244_logger.LogDebug("Finished removing the certificate from the keychain."); 1248_logger.LogWarning("An error has occurred while running the remove trust command: {ExitCode}.", exitCode); 1252_logger.LogDebug("Removing the certificate from the user store {Certificate}.", certificate); 1256_logger.LogDebug("Finished removing the certificate from the user store."); 1260_logger.LogError("An error has occurred while removing the certificate from the user store: {Error}.", error); 1264_logger.LogDebug("Adding certificate to the trusted root certification authority store."); 1268_logger.LogDebug("The certificate is already trusted."); 1272_logger.LogDebug("Trusting the certificate was cancelled by the user."); 1276_logger.LogDebug("Removing the certificate from the trusted root certification authority store."); 1280_logger.LogDebug("Finished removing the certificate from the trusted root certification authority store."); 1284_logger.LogDebug("The certificate was not trusted."); 1288_logger.LogDebug("Correcting the the certificate state for '{Certificate}'.", certificate); 1292_logger.LogDebug("Finished correcting the certificate state."); 1296_logger.LogError("An error has occurred while correcting the certificate state: {Error}.", error); 1300_logger.LogDebug("Importing the certificate {Certificate} to the keychain '{Keychain}'.", certificate, keychain); 1304_logger.LogDebug("Finished importing the certificate to the keychain."); 1308_logger.LogError("An error has occurred while importing the certificate to the keychain: {ExitCode}, {Output}", exitCode, output); 1312_logger.LogDebug("Writing the certificate to: {Path}.", path); 1316_logger.LogError("An error has occurred while writing the certificate to disk: {Error}.", error); 1320_logger.LogError("The file '{CertificatePath}' does not exist.", certificatePath); 1324_logger.LogError("One or more HTTPS certificates exist '{CertificateDescription}'.", certificateDescription); 1328_logger.LogDebug("Loading certificate from path '{CertificatePath}'.", certificatePath); 1332_logger.LogDebug("The certificate '{Description}' has been loaded successfully.", description); 1336_logger.LogError("An error has occurred while loading the certificate from disk: {Error}.", error); 1340_logger.LogError("The provided certificate '{Description}' is not a valid ASP.NET Core HTTPS development certificate.", description); 1344_logger.LogDebug("The certificate is already trusted."); 1348_logger.LogDebug("Saving the certificate {Certificate} to the user profile folder '{Directory}'.", certificate, directory); 1352_logger.LogDebug("Finished saving the certificate to the user profile folder."); 1356_logger.LogError("An error has occurred while saving certificate '{CertificateThumbprint}' in the user profile folder: {ErrorMessage}.", certificateThumbprint, errorMessage); 1360_logger.LogError("An error has occurred while removing certificate '{CertificateThumbprint}' from the user profile folder: {ErrorMessage}.", certificateThumbprint, errorMessage); 1364_logger.LogError("The file '{Path}' is not a valid certificate.", path); 1368_logger.LogWarning("The on-disk store directory was not found."); 1372_logger.LogDebug("Reading OpenSSL trusted certificates location from {NssDbOverrideVariableName}.", nssDbOverrideVariableName); 1376_logger.LogDebug("Reading NSS database locations from {EnvironmentVariable}.", environmentVariable); 1380_logger.LogWarning("The NSS database '{NssDb}' provided via {EnvironmentVariable} does not exist.", nssDb, environmentVariable); 1384_logger.LogWarning("The certificate is not trusted by .NET. This will likely affect System.Net.Http.HttpClient."); 1388_logger.LogWarning("The certificate is not trusted by OpenSSL. Ensure that the {EnvVarName} environment variable is set correctly.", envVarName); 1392_logger.LogWarning("The certificate is not trusted in the NSS database in '{Path}'. This will likely affect the {Browser} family of browsers.", path, browser); 1396_logger.LogDebug("Home directory '{HomeDirectory}' does not exist. Unable to discover NSS databases for user '{Username}'. This will likely affect browsers.", homeDirectory, username); 1400_logger.LogDebug("OpenSSL reported its directory in an unexpected format."); 1404_logger.LogDebug("Unable to determine the OpenSSL directory."); 1408_logger.LogDebug("Unable to determine the OpenSSL directory: {ExceptionMessage}.", exceptionMessage); 1412_logger.LogError("Unable to compute the hash of certificate {CertificatePath}. OpenSSL trust is likely in an inconsistent state.", certificatePath); 1416_logger.LogError("Unable to compute the certificate hash: {CertificatePath}. OpenSSL trust is likely in an inconsistent state. {ExceptionMessage}", certificatePath, exceptionMessage); 1420_logger.LogError("Unable to update certificate '{FullName}' in the OpenSSL trusted certificate hash collection - {MaxHashCollisions} certificates have the hash {Hash}.", fullName, maxHashCollisions, hash); 1424_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); 1428_logger.LogWarning("Failed to trust the certificate in .NET: {ExceptionMessage}.", exceptionMessage); 1432_logger.LogDebug("Trusted the certificate in .NET."); 1436_logger.LogWarning("Clients that validate certificate trust using OpenSSL will not trust the certificate."); 1440_logger.LogDebug("Trusted the certificate in OpenSSL."); 1444_logger.LogWarning("Failed to trust the certificate in the NSS database in '{Path}'. This will likely affect the {Browser} family of browsers.", path, browser); 1448_logger.LogDebug("Trusted the certificate in the NSS database in '{Path}'.", path); 1452_logger.LogWarning("Failed to untrust the certificate in .NET: {ExceptionMessage}.", exceptionMessage); 1456_logger.LogWarning("Failed to untrust the certificate in OpenSSL."); 1460_logger.LogDebug("Untrusted the certificate in OpenSSL."); 1464_logger.LogWarning("Failed to remove the certificate from the NSS database in '{Path}'.", path); 1468_logger.LogDebug("Removed the certificate from the NSS database in '{Path}'.", path); 1472_logger.LogWarning("The certificate is only partially trusted - some clients will not accept it."); 1476_logger.LogWarning("Failed to look up the certificate in the NSS database in '{Path}': {ExceptionMessage}.", path, exceptionMessage); 1480_logger.LogWarning("Failed to add the certificate to the NSS database in '{Path}': {ExceptionMessage}.", path, exceptionMessage); 1484_logger.LogWarning("Failed to remove the certificate from the NSS database in '{Path}': {ExceptionMessage}.", path, exceptionMessage); 1488_logger.LogWarning("Failed to find the Firefox profiles in directory '{FirefoxDirectory}': {Message}.", firefoxDirectory, message); 1492_logger.LogDebug("No Firefox profiles found in directory '{FirefoxDirectory}'.", firefoxDirectory); 1496_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); 1500_logger.LogWarning("The {OpenSslCertDirectoryOverrideVariableName} environment variable is set but will not be consumed while checking trust.", openSslCertDirectoryOverrideVariableName); 1504_logger.LogWarning("The {OpenSslCommand} command is unavailable. It is required for updating certificate trust in OpenSSL.", openSslCommand); 1508_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); 1512_logger.LogDebug("Untrusting the certificate in OpenSSL was skipped since '{CertPath}' does not exist.", certPath); 1516_logger.LogWarning("Failed to delete certificate file '{CertPath}': {ExceptionMessage}.", certPath, exceptionMessage); 1520_logger.LogError("Unable to export the certificate since '{CertPath}' already exists. Please remove it.", certPath); 1524_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); 1528_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); 1532_logger.LogWarning("Directory '{DirectoryPath}' may be readable by other users.", directoryPath); 1536_logger.LogDebug("The certificate directory '{CertDir}' is already included in the {EnvVarName} environment variable.", certDir, envVarName); 1540_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); 1544_logger.LogDebug("Successfully trusted the certificate in the Windows certificate store via WSL."); 1548_logger.LogWarning("Failed to trust the certificate in the Windows certificate store via WSL."); 1552_logger.LogWarning("Failed to trust the certificate in the Windows certificate store via WSL: {ExceptionMessage}.", exceptionMessage); 1556_logger.LogDebug("Meets minimum version certificates: {MeetsMinimumVersionCertificates}", meetsMinimumVersionCertificates); 1560_logger.LogDebug("Below minimum version certificates: {BelowMinimumVersionCertificates}", belowMinimumVersionCertificates);