当我推送到GitHub仓库时,我最近遇到以下消息:
"fatal: HttpRequestException encountered. "
然后再次提示输入我的用户名和密码.
从以前的搜索中,Visual Studio和其他各种搜索具有相同的根问题.对于那些比我更懒的人来说,不同应用程序/操作系统的各种解决方案的摘要在这里进行了相关的讨论.希望人们觉得这很有帮助.
无法真正将更新服务称为问题,所以这就是原因.问题是GitHub已经删除了TLS-1.0支持,这导致了客户端的问题,包括Microsoft Visual Studio内置的git客户端,Git版本低于1.14以及GUI客户端包括tortoiseGit等.完整的发行说明可以在这里找到: https://githubengineering.com/crypto-removal-notice/
Bitbucket将从2018年12月1日开始下降TLSv1.0和TLSv1.1.我预计会遇到类似的问题.
编辑:将我的自我答案移至答案框.见下文.
我正在尝试向 Java 中的端点发出 POST 请求,当我尝试发送请求时,出现以下错误:
Caused by: javax.net.ssl.SSLHandshakeException: The server selected protocol version TLS10 is not accepted by client preferences [TLS13, TLS12]
Run Code Online (Sandbox Code Playgroud)
这是我到目前为止
Map<Object, Object> data = new HashMap<>();
data.put("username","foo");
data.put("password","bar");
String url = "https://google.com";
HttpRequest request = HttpRequest.newBuilder()
.POST(buildFormDataFromMap(data))
.uri(URI.create(url))
.build();
try{
HttpResponse<String> response = httpClient.send(request,
HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode());
System.out.println(response.body());
} catch (Exception e){
e.printStackTrace();
}
Run Code Online (Sandbox Code Playgroud)
然后当我运行代码时,发送请求/制作响应对象时会抛出错误。我的问题是,如果服务器与客户端的 TLS 首选项不同,我该如何更改 Java 中的首选项,以便它仍然可以发出请求?
当我尝试连接到 Apache Directory Studio 中的 SSL(协议 v3)LDAP 服务器时,出现此错误。
我正在端口 636 (ldaps) 上使用 SSL 加密连接到 LDAP 服务器。
ERR_04120_TLS_HANDSHAKE_ERROR The TLS handshake failed, reason: Unspecified: The server selected protocol version TLS10 is not accepted by client preferences [TLS12]
Run Code Online (Sandbox Code Playgroud)
我在 MacOS 11.2.3 (20D91) java.version=16 java.vendor=Azul Systems, Inc. 上使用 Apache Directory Studio 版本:2.0.0.v20210213-M16。
看来“某些”更新可能在我的 Mac 上禁用了 TLS1.0???
有任何线索如何解决这个问题吗?
我的 nginx confid 文件如下所示:
server {
listen 80;
listen [::]:80;
server_name hostserver.ru www.hostserver.ru;
return 301 https://hostserver.ru$request_uri;
server_tokens off;
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name hostserver.ru www.hostserver.ru;
ssl_certificate /etc/letsencrypt/live/hostserver.ru/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/hostserver.ru/privkey.pem;
ssl_dhparam /etc/ssl/certs/dhparam.pem;
ssl_session_timeout 1d;
ssl_session_cache shared:SSL:50m;
ssl_session_tickets off;
ssl_protocols TLSv1.2;
ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-R$
ssl_prefer_server_ciphers on;
add_header Strict-Transport-Security "max-age=31536000" always;
ssl_stapling on;
ssl_stapling_verify on;
root /var/www/html;
index index.html index.htm;
server_tokens off;
... some location stuff...
}
Run Code Online (Sandbox Code Playgroud)
不幸的是,Android 4.0-4.3 不支持 TLS1.2,我更改了配置:
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
Run Code Online (Sandbox Code Playgroud)
但是在使用SSLTest …
Node 现在支持 TLS 1.3,它提供了更高的安全性和更低的延迟。
通过实施 TLS 1.3,Node 应用程序将增加最终用户的隐私,同时通过减少 HTTPS 握手所需的时间来提高请求的性能。
默认情况下已禁用 TLS 1.0 和 1.1,并且加密库已删除不推荐使用的功能。
有没有办法重新启用 1.0 和 1.1?
我使用 okhttp 向服务器发送请求,但出现错误
Server chose TLSv1, but that protocol version is not enabled or not supported by the client.
javax.net.ssl.SSLHandshakeException: Server chose TLSv1, but that protocol version is not enabled or not supported by the client.
at sun.security.ssl.ClientHandshaker.serverHello(ClientHandshaker.java:452)
at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:206)
at sun.security.ssl.Handshaker.processLoop(Handshaker.java:1026)
at sun.security.ssl.Handshaker.process_record(Handshaker.java:961)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1062)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387)
at okhttp3.internal.connection.RealConnection.connectTls(RealConnection.java:336)
at okhttp3.internal.connection.RealConnection.establishProtocol(RealConnection.java:300)
at okhttp3.internal.connection.RealConnection.connect(RealConnection.java:185)
at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.java:224)
at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.java:108)
at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.java:88)
at okhttp3.internal.connection.Transmitter.newExchange(Transmitter.java:169)
at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:41)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:94)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93) …
Run Code Online (Sandbox Code Playgroud) 我们最近对托管在Azure中的应用程序进行了“安全性审查”,其中之一是我们没有禁用TLS 1.0。
虽然我知道我们可以为Web角色甚至是App Services禁用TLS 1.0(或者至少很快将能够执行此操作),但我们还允许移动应用程序使用REST API直接将数据上传到Blob存储。扫描发现了这一点并将其标记为问题?
是否有人知道这里可能的解决方案,为每个容器禁用它的措施或其他措施?
我能看到的唯一解决方案是实现我们自己的端点,但这将是最后的选择。如果有人对这个问题有更简单的解决方案,是否会徘徊?
我正在 Docker Alpine 镜像中编写一个简单的网络爬虫。但是,我无法将 HTTPS 请求发送到仅支持 TLS1.0 的服务器。如何配置 Alpine linux 以允许过时的 TLS 版本?
我尝试添加MinProtocol
但/etc/ssl/openssl.cnf
没有运气。
Dockerfile 示例:
FROM node:12.0-alpine
RUN printf "[system_default_sect]\nMinProtocol = TLSv1.0\nCipherString = DEFAULT@SECLEVEL=1" >> /etc/ssl/openssl.cnf
CMD ["/usr/bin/wget", "https://www.restauracesalanda.cz/"]
Run Code Online (Sandbox Code Playgroud)
当我构建并运行这个容器时,我得到
Connecting to www.restauracesalanda.cz (93.185.102.124:443)
ssl_client: www.restauracesalanda.cz: handshake failed: error:1425F102:SSL routines:ssl_choose_client_version:unsupported protocol
wget: error getting response: Connection reset by peer
Run Code Online (Sandbox Code Playgroud) 我想在 Ubuntu 服务器 18 中启用 TLS 1.2。
我已经编辑了/etc/apache2/mods-available/ssl.conf
,添加
SSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
SSLCipherSuite HIGH:!aNULL:!MD5:!3DES
SSLHonorCipherOrder on
Run Code Online (Sandbox Code Playgroud)
但 Apache 仍在使用 tls 1.0。是否可以激活 tls 1.2?
Apache 版本是 Apache/2.4.29 (Ubuntu)
我正在尝试使用 jdk1.8.0_xxx 连接到 jms 服务,但出现 ssl 握手错误。但是,我无法真正理解 javax.net.debug 的输出。
System property jdk.tls.client.cipherSuites is set to 'null'
System property jdk.tls.server.cipherSuites is set to 'null'
Ignoring disabled cipher suite: TLS_DH_anon_WITH_AES_256_CBC_SHA
Ignoring disabled cipher suite: TLS_DH_anon_WITH_AES_256_CBC_SHA256
Ignoring disabled cipher suite: TLS_ECDHE_RSA_WITH_NULL_SHA
Ignoring disabled cipher suite: SSL_RSA_WITH_DES_CBC_SHA
Ignoring disabled cipher suite: SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA
Ignoring disabled cipher suite: TLS_KRB5_WITH_DES_CBC_MD5
Ignoring disabled cipher suite: TLS_ECDH_RSA_WITH_NULL_SHA
Ignoring disabled cipher suite: SSL_DH_anon_EXPORT_WITH_RC4_40_MD5
Ignoring disabled cipher suite: SSL_DH_anon_WITH_DES_CBC_SHA
Ignoring disabled cipher suite: TLS_DH_anon_WITH_AES_128_CBC_SHA
Ignoring disabled cipher suite: TLS_KRB5_WITH_3DES_EDE_CBC_SHA
Ignoring disabled …
Run Code Online (Sandbox Code Playgroud) 我是一个非技术但能够阅读手册的网站所有者。我在 Debian 9.0 服务器上运行 Apache 2.4.10。我想禁用 TLS 1.0。我已经阅读了 SSLProtocol 指令的Apache 文档。
在我的虚拟主机文件中,我使用了以下指令:
SSLProtocol all -TLSv1 -SSLv3
Run Code Online (Sandbox Code Playgroud)
即使在重新加载然后重新启动 Apache 之后,这也不起作用。然后我也向 ssl.conf 文件添加了相同的指令,只是为了确定,即使在重新加载和重新启动之后仍然没有运气。我还使用以下指令尝试了相同的操作:
SSLProtocol +TLSv1.1 +TLSv1.2
Run Code Online (Sandbox Code Playgroud)
仍然没有运气。我进行了以下搜索只是为了查看我是否在配置文件中的其他地方使用了 SSLProtocol 指令,但同样没有运气:
grep -R 'SSLProtocol' .
Run Code Online (Sandbox Code Playgroud)
我还检查了网站的 .htaccess 文件以确保我没有覆盖任何内容(尽管我不知道您可以在 .htaccess 文件中更改此设置)。有任何想法吗?感谢您的帮助!
我使用 git-tfs 已经快 5 年了,然后有一天,我在运行时遇到以下错误git tfs fetch
:
TF400324: Team Foundation services are not available from server https://tfs.company.com/tfs/foo.
Technical information (for administrator):
The underlying connection was closed: An unexpected error occurred on a send.
The underlying connection was closed: An unexpected error occurred on a send.
Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
An existing connection was forcibly closed by the remote host
Run Code Online (Sandbox Code Playgroud)
我什至打开 Fiddler 看看发生了什么,当我的笔记本电脑尝试连接时,TFS 服务器实际上断开了套接字。
在与我们的一位服务器管理员交谈后,我发现我们的 …
我们有一个 haproxy 实例,我们的应用程序之一仅支持 TLSv1.0。当它尝试通过此 haproxy 连接时,它会因握手失败而失败。
我如何在此 haproxy 实例上启用 TLSv1.0 支持。下面是我的 haproxy.cfg
global
daemon
log /var/log local0 debug
maxconn 4000
ssl-default-bind-options no-sslv3
tune.ssl.default-dh-param 2048
stats socket /var/lib/haproxy/stats
#---------------------------------------------------------------------
defaults
mode http
log global
option httplog
option dontlognull
option http-server-close
option forwardfor except 127.0.0.0/8
option redispatch
retries 3
timeout http-request 10m
timeout connect 10s
timeout client 10s
timeout server 10s
#---------------------------------------------------------------------
frontend api_passthrough
bind *:443 ssl crt /usr/local/etc/certs/ ciphers CECPQ1-RSA-AES256-GCM-SHA384:CECPQ1-RSA-CHACHA20-POLY1305-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-CCM:DHE-RSA-AES256-CCM:DHE-RSA-AES128-CCM8:DHE-RSA-AES256-CCM8:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-CAMELLIA128-SHA256:DHE-RSA-CAMELLIA256-SHA256:DHE-RSA-CHACHA20-POLY1305:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-CAMELLIA128-SHA256:ECDHE-RSA-CAMELLIA256-SHA384:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:CECPQ1-ECDSA-AES256-GCM-SHA384:CECPQ1-ECDSA-CHACHA20-POLY1305-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES128-CCM:ECDHE-ECDSA-AES256-CCM:ECDHE-ECDSA-AES128-CCM8:ECDHE-ECDSA-AES256-CCM8:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-CAMELLIA128-SHA256:ECDHE-ECDSA-CAMELLIA256-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-ECDSA-CHACHA20-POLY1305:DHE-DSS-AES128-SHA256:DHE-DSS-AES256-SHA:DHE-DSS-AES128-GCM-SHA256:DHE-DSS-AES256-GCM-SHA384:DHE-DSS-CAMELLIA128-SHA256:DHE-DSS-CAMELLIA256-SHA256
log /dev/log local0 debug
use_backend hapstats if { path_beg /stats } …
Run Code Online (Sandbox Code Playgroud)