我正在尝试连接到本地SQL Server(Microsoft SQL Server Express),但是我一直遇到与证书验证有关的错误。
当我通过 encrypt = false
或 trustServerCertificate = true
时,通过本地运行的Java(带有JDBC)的连接工作起作用,否则我会收到一个错误消息:
“错误:” PKIX路径构建失败:Sun.Security.Provider.CertPath.SuncertPathBuildErexception:无法找到所请求的目标的有效认证路径”。
“错误:” PKIX路径构建失败: //develvemens.google.com/apps-script/reference/jdbc/jdbc#getConnectionUrl,info“ rel =“ nofollow noreferrer”>(如在此处记录),但我不确定他们是什么在 _Serversslcertificate
_ClientsSlcertificate 或 _CLIENTSLKEY
five中,实际上在 _serversslcertificate
_serverssslcertificate 中寻找
。我尝试在服务器上应用带有PowerShell和Windows IIS生成的自签名证书,但是在我执行此操作之后,它根本不会重新启动
。
I'm trying to connect to an on-premises sql server (Microsoft Sql Server Express), but I keep getting an error that has to do with the validation of the certificate.
Connections through locally-run java (with JDBC) work when I pass encrypt=false
or trustServerCertificate=true
, otherwise I get an error message :
"Error: "PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target".
I know that Google Apps Scripts allows for using self-signed certificates (as documented here), but I'm not sure what they're actually looking for in the _serverSslCertificate
, _clientSslCertificate
, or _clientSslKey
fields.
Unfortunately, I'm not able to share more details about the network I'm working in. I've tried applying self-signed certificates generated with PowerShell and Windows IIS to the server, but it simply doesn't restart after I do this.
Any help is appreciated.
发布评论
评论(1)
这些参数需要SSL证书以及服务器和客户端的密钥。如有记录在这里,您可以在这些参数上看到他们所需的预期值。请参阅下面的摘要:
您可以尝试以上片段,但这最初是针对MySQL的,据报道尚未适用于Microsoft SQL Server。后者有自己的问题发布在这里,但仍然没有任何更新。
可能帮助您的指南在下面链接。
参考:
These parameters require SSL certificates and key of the server and client. As documented here, you can see the expected values they need on those parameters. See snippet below:
You can try the above snippet but this is for MySQL originally and is reported to have not worked for Microsoft SQL Server. The latter has its own issue posted here but still doesn't have any updates.
Guides that might help you are linked below.
References: