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
Cannot connect to SSL server using IP address #2691
Comments
|
@jboeuf Could you take a look? |
|
Sorry, this slipped through the cracks... On Thu, Nov 5, 2015 at 2:22 PM, David G. Quintas notifications@github.com
|
|
No problem. We changed our design a bit to use hostnames instead. I think that's better in the long run anyway. So we don't need this feature anymore. |
|
Thanks much for letting me know. On Sun, Nov 8, 2015 at 9:11 AM, dreveny notifications@github.com wrote:
|
|
Closing for now. Please re-open if someone wants this feature. |
|
Facing the same issue with C# while implementing SSL/TLS in grpc. I generated a certificate with CN = 192.168.1.6 and used it to create objects of SslServerCredentials and SslCredentials. But when client connects to server it throws errors. It works fine with certificate CN=localhost or system names. Is there any workaround on this? Server side: |
|
@parmeshthee Try using the subjectAltName instead of CN - it worked for me with an IP address (in Python, but the code that verifies the domain is in the C++ core regardless). For reference, see https://github.com/grpc/grpc/blob/master/src/core/tsi/ssl_transport_security.cc, function |
Using the C++ interface, if I setup a server using SslServerCredentials and give it a certificate having a CN or subjectAltName that is an IP address (such as 127.0.0.1 or IP:127.0.0.1), the client (on the same machine in this case) cannot connect and gives the error:
"Peer name 127.0.0.1 is not in peer certificate"
However when I dump the certificate, I do indeed see that address. I've tried different formats as well but I think I found where all IP addresses are blocked:
https://github.com/grpc/grpc/blob/master/src/core/tsi/ssl_transport_security.c#L1402
Is there a way I can do this? Or is there a plan to support this in the future?
The text was updated successfully, but these errors were encountered: