Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upx509: cannot validate certificate for <ipaddress> because it doesn't contain any IP SANs #1654
Comments
This comment has been minimized.
This comment has been minimized.
|
Technically, this is not a valid SSL cert, because it doesn't match the name (in this case, IP) being used to connect. You have three options:
|
This comment has been minimized.
This comment has been minimized.
|
So 'valid SSL cert' means it has a complete chain of trust to a root CA. IF there was a proper DNS entry, this would be a non-issue. However these are dynamic environments ( autoscaling / spot instances ), so I do not want to manage an ever changing list of DNS entries or host entries. I already specified that I don't want to disable verification completely. There is another option: specify |
This comment has been minimized.
This comment has been minimized.
|
The chain of trust is only one aspect of the validity of a certificate. What you're running into- effectively a name mismatch (you call it 1.2.3.4, the cert says it's valid for some.host.example.com)- is another very important validity check. You're right that providing an alternative expected hostname to the SSL verification routine would fix this issue. Hopefully the devs will implement this for you. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Implemented in #1658 |
gregorygtseng
closed this
May 26, 2016
atombender
referenced this issue
Jul 19, 2016
Closed
Kubernetes SD fails with x509 name mismatch #1822
luckypoem
referenced this issue
Mar 28, 2018
Closed
运行了“./local -raddr http://example.com:8080 -secret <password> -logtostderr”之后 #17
This comment has been minimized.
This comment has been minimized.
vhosakot
commented
Feb 11, 2019
|
I saw the same error when using mysql client in golang:
and setting |
gregorygtseng commentedMay 24, 2016
I have a use case where I am scraping hosts via IP, but they serve a valid SSL cert. I don't want to use the
insecure_skip_verifyoption in<tls_config>. What options do I have?