-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to disable RemoteCertificateNameMismatch for self-signed certificates #196
Comments
It sounds like the host name being used does not match the cert name you have configured. Beyond that, I'm not sure. |
cert with subject, "CN = id-local.globomantics.com" is placed in trusted root certification authorities Call to "https://id-local.globomantics.com:44395/.well-known/openid-configuration" via browser has no issues. Note that the port 443 in the container is mapped to 44395 on host
code is present on the aspnet core 6.0 web app to ignore cert validation errors Not sure what else can I do? |
All set on this issue -- can we close? |
It was a docker port mapping issue and a missing |
Hello, I have the same problem as yours. Can you please explain exactly how your problem was solved? I don't have docker |
@hojatallahkazemi could you please open a new issue to describe your symptoms and environment in more detail? |
Which version of Duende IdentityServer are you using? 4 (identityModel 6.0.0)
Which version of .NET are you using? 6.0
Describe the bug
I am trying to use a self-signed certificate in a docker compose set up with nginx for ssl. the call to the discovery metadata doc using https works fine in browser (https://mylocalserver.com:44395/.well-known/openid-configuration) after I added the cert created using openssl to the Local machine's "trusted root certification authorities".
the certificate is issued to
mylocalserver.com
I also the following line of code in the Main()
ServicePointManager.ServerCertificateValidationCallback += (o, c, ch, er) => true;
A clear and concise description of what the bug is.
I get the following exception when I run the aspnetcore web app of mine
when
To Reproduce
Steps to reproduce the behavior.
Try using a self-signed certificate in a docker compose environment with a aspnetcore web app
Expected behavior
The C# code that switches off the certificate validation should have suppressed this check
A clear and concise description of what you expected to happen.
Log output/exception with stacktrace
Code from startup.cs (happy to provide more if that helps
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: