我尝试从两台不同的服务器访问 HTTPS 站点。在一台服务器上,wget 运行正常,但在另一台服务器上,它会给出与 SSL 相关的错误。我可以在客户端提供哪些选项来使其正常工作?
工作 Wget 版本:
GNU Wget 1.12 built on linux-gnu.
+digest +ipv6 +nls +ntlm +opie +md5/openssl +https -gnutls +openssl
-iri
Wgetrc:
/etc/wgetrc (system)
Locale: /usr/share/locale
Compile: gcc -DHAVE_CONFIG_H -DSYSTEM_WGETRC="/etc/wgetrc"
-DLOCALEDIR="/usr/share/locale" -I. -I../lib -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=generic -fno-strict-aliasing
Link: gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic
-fno-strict-aliasing -Wl,-z,relro -lssl -lcrypto
/usr/lib64/libssl.so /usr/lib64/libcrypto.so -ldl -lrt ftp-opie.o
openssl.o http-ntlm.o gen-md5.o ../lib/libgnu.a
Copyright © 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://www.gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Originally written by Hrvoje Nikšić <[email protected]>.
Currently maintained by Micah Cowan <[email protected]>.
Please send bug reports and questions to <[email protected]>.
工作 Wget 输出:
wget https://xxx.xxxxx.com/NodeBeanService/NodeBean?wsdl
--2017-03-21 15:12:43-- https://xxx.xxxxx.com/NodeBeanService/NodeBean?wsdl
Resolving xxx.xxxxx.com... xxx.xxx.xxx.xxx
Connecting to xxx.xxxxx.com|xxx.xxx.xxx.xxx|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/xml]
Saving to: “NodeBean?wsdl.1”
[ <=> ] 32,506 89.8K/s in 0.4s
2017-03-21 15:12:44 (89.8 KB/s) - “NodeBean?wsdl.1” saved [32506]
不工作的 Wget 版本:
GNU Wget 1.11.4
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://www.gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Originally written by Hrvoje Niksic <[email protected]>.
Currently maintained by Micah Cowan <[email protected]>.
不起作用的 Wget 输出:
wget https://xxx.xxxxx.com/NodeBeanService/NodeBean?wsdl
--2017-03-21 15:04:53-- https://xxx.xxxxx.com/NodeBeanService/NodeBean?wsdl
Resolving xxx.xxxxx.com...xxx.xxx.xxx.xxx
Connecting to xxx.xxxxx.com|xxx.xxx.xxx.xxx|:443... connected.
OpenSSL: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
Unable to establish SSL connection.