Is there an existing issue for this?
Describe the bug
On Linux, Aspire appears to replace the SSL_CERT_DIR environment variable for hosted projects with an Aspire-generated temporary directory.
Example value observed inside the hosted application:
SSL_CERT_FILE=
SSL_CERT_DIR=/tmp/aspire-*//certs
As a result, outbound HTTPS requests may fail with certificate validation errors even though the same requests work correctly outside Aspire.
Environment
- Fedora Linux
- .NET 10
- Aspire CLI 13.4.3
Related issue
This issue appears closely related to:
However, that issue is closed and the behavior can still be reproduced.
Expected Behavior
Aspire should preserve access to the system OpenSSL trust store when configuring development certificates.
Possible approaches:
- Append Aspire certificates to the existing trust directories.
- Preserve the system SSL_CERT_DIR.
- Merge Aspire-generated certificates with the system trust configuration.
Hosted applications should be able to use Aspire development certificates without breaking outbound HTTPS requests to external services.
Steps To Reproduce
- Create a simple Aspire application on Linux.
- Print SSL_CERT_FILE and SSL_CERT_DIR from the hosted project.
- Observe that SSL_CERT_DIR points to an Aspire-generated temporary directory.
- Make an outbound HTTPS request to an external service.
- Certificate validation fails while the same request succeeds outside Aspire.
Exceptions (if any)
System.Security.Authentication.AuthenticationException: The remote certificate is invalid because of errors in the certificate chain: NotSignatureValid, UntrustedRoot
Aspire doctor output
Aspire Environment Check
Aspire
✅ Aspire CLI version 13.4.3 (channel: stable)
.NET SDK
✅ .NET 10.0.300 installed (x64)
Container Runtime
⚠️ Docker: installed but not running
Start Docker daemon
✅ Podman v5.8.2: running (auto-detected (only runtime running)) ← active
Environment
⚠️ HTTPS development certificate is only partially trusted
Set SSL_CERT_DIR in your shell profile: export
SSL_CERT_DIR="$SSL_CERT_DIR:/etc/pki/tls/certs:/home/axi/.aspnet/dev-certs/trust"
See: https://aka.ms/aspire-prerequisites#dev-certs
Details:
The certificate is in the trusted store, but SSL_CERT_DIR is not configured to
include '/home/axi/.aspnet/dev-certs/trust'. Some applications may not trust the
certificate. 'aspire run' will configure this automatically.
Summary: 3 passed, 2 warnings, 0 failed
For detailed prerequisites: https://aka.ms/aspire-prerequisites
Aspire CLI Installations
| Path |
Version |
Channel |
Route |
PATH status |
| /home/axi/.aspire/bin/aspire (current) |
13.4.3+4f218933552e18ff2874d 1b6d5dc3fe671e3b6d9 |
stable |
script |
active |
Anything else?
Running:
aspire certs trust
returns:
Developer certificates may not be fully trusted (trust exit code was:
PartiallyFailedToTrustTheCertificate).
❌ Failed to trust HTTPS development certificate. Certificate trust operation returned:
PartiallyFailedToTrustTheCertificate
and logs contain:
The certificate is not trusted by OpenSSL.
Ensure that the SSL_CERT_DIR environment variable is set correctly.
Is there an existing issue for this?
Describe the bug
On Linux, Aspire appears to replace the SSL_CERT_DIR environment variable for hosted projects with an Aspire-generated temporary directory.
Example value observed inside the hosted application:
SSL_CERT_FILE=
SSL_CERT_DIR=/tmp/aspire-*//certs
As a result, outbound HTTPS requests may fail with certificate validation errors even though the same requests work correctly outside Aspire.
Environment
Related issue
This issue appears closely related to:
However, that issue is closed and the behavior can still be reproduced.
Expected Behavior
Aspire should preserve access to the system OpenSSL trust store when configuring development certificates.
Possible approaches:
Hosted applications should be able to use Aspire development certificates without breaking outbound HTTPS requests to external services.
Steps To Reproduce
Exceptions (if any)
System.Security.Authentication.AuthenticationException: The remote certificate is invalid because of errors in the certificate chain: NotSignatureValid, UntrustedRoot
Aspire doctor output
Aspire Environment Check
Aspire
✅ Aspire CLI version 13.4.3 (channel: stable)
.NET SDK
✅ .NET 10.0.300 installed (x64)
Container Runtime
⚠️ Docker: installed but not running
Start Docker daemon
✅ Podman v5.8.2: running (auto-detected (only runtime running)) ← active
Environment
⚠️ HTTPS development certificate is only partially trusted
Set SSL_CERT_DIR in your shell profile: export
SSL_CERT_DIR="$SSL_CERT_DIR:/etc/pki/tls/certs:/home/axi/.aspnet/dev-certs/trust"
See: https://aka.ms/aspire-prerequisites#dev-certs
Details:
The certificate is in the trusted store, but SSL_CERT_DIR is not configured to
include '/home/axi/.aspnet/dev-certs/trust'. Some applications may not trust the
certificate. 'aspire run' will configure this automatically.
Summary: 3 passed, 2 warnings, 0 failed
For detailed prerequisites: https://aka.ms/aspire-prerequisites
Aspire CLI Installations
Anything else?
Running:
aspire certs trustreturns:
Developer certificates may not be fully trusted (trust exit code was:
PartiallyFailedToTrustTheCertificate).
❌ Failed to trust HTTPS development certificate. Certificate trust operation returned:
PartiallyFailedToTrustTheCertificate
and logs contain:
The certificate is not trusted by OpenSSL.
Ensure that the SSL_CERT_DIR environment variable is set correctly.