[JAVA] Problems that cannot be wget. (Warning: The name `www.oracle.com'on the certificate and the host name ʻedelivery.oracle.com' do not match)

Introduction

In response to a Java vulnerability, if you wget to uninstall the old Java and install the new one, you should get the rpm file, but the unknown file is downloaded!

When you download it, it looks like this.

# wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup -cookie" http://download.oracle.com/otn-pub/java/jdk/8u152-b16/aa0333dd3019491ca4f6ddbe78cdb6d0/jdk-8u152-linux-x64.r pm

--2017-11-13 13:39:07--  http://download.oracle.com/otn-pub/java/jdk/8u152-b16/aa0333dd3019491ca4f6ddbe78cdb6d0/jdk-8u152-linux-x64.rpm
download.oracle.Querying com to DNS... 211.131.224.80, 211.131.224.72
download.oracle.com|211.131.224.80|:Connecting to 80...Connected.
Sent a connection request via HTTP, waiting for a response... 302 Moved Temporarily
place: https://edelivery.oracle.com/otn-pub/java/jdk/8u152-b16/aa0333dd3019491ca4f6ddbe78cdb6d0/jdk-8u152-linux-x64.rpm [Continue]
--2017-11-13 13:39:07--  https://edelivery.oracle.com/otn-pub/java/jdk/8u152-b16/aa0333dd3019491ca4f6ddbe78cdb6d0/jdk-8u152-linux-x64.rpm
edelivery.oracle.Querying com to DNS... 23.2.38.98, 2600:140b:2000:293::2d3e, 2600:140b:2000:28e::2d3e
edelivery.oracle.com|23.2.38.98|:Connecting to 443...Connected.
warning:The name on the certificate`www.oracle.com'And host name`edelivery.oracle.com'Does not match
Sent a connection request via HTTP, waiting for a response... 302 Moved Temporarily
place: http://download.oracle.com/otn-pub/java/jdk/8u152-b16/aa0333dd3019491ca4f6ddbe78cdb6d0/jdk-8u152-linux-x64.rpm?AuthParam=1510548067_6ab20383cb905d548883b72e46400d03 [Continue]
--2017-11-13 13:39:07--  http://download.oracle.com/otn-pub/java/jdk/8u152-b16/aa0333dd3019491ca4f6ddbe78cdb6d0/jdk-8u152-linux-x64.rpm?AuthParam=1510548067_6ab20383cb905d548883b72e46400d03
download.oracle.com|211.131.224.80|:Connecting to 80...Connected.
Sent a connection request via HTTP, waiting for a response... 200 OK
length: 174192082 (166M) [application/x-redhat-package-manager]
`jdk-8u152-linux-x64.rpm?AuthParam=1510548067_6ab20383cb905d548883b72e46400d03'Saving in

 0% [                                                                            ] 0           --.-K/s               9% [======>                                                                     ] 16,051,387  76.5M/s              19% [=============>                                                              ] 33,686,131  80.3M/s              29% [=====================>                                                      ] 50,939,587  81.0M/s              38% [============================>                                               ] 67,082,636  80.0M/s              48% [===================================>                                        ] 84,061,932  80.2M/s              58% [===========================================>                                ] 102,761,993 81.6M/s              69% [====================================================>                       ] 121,636,361 82.6M/s              80% [============================================================>               ] 140,481,002 83.5M/s              90% [====================================================================>       ] 158,374,330 83.7M/s              100%[===========================================================================>] 174,192,082 84.2M/s time 2.0s    

2017-11-13 13:39:09 (84.2 MB/s) - `jdk-8u152-linux-x64.rpm?AuthParam=1510548067_6ab20383cb905d548883b72e46400d03'Save to[174192082/174192082]

Looking at what was actually downloaded, ... What's this. .. .. ..

# ls
jdk-8u152-linux-x64.rpm?AuthParam=1510547908_7d12ba9a498c9f9a753cde97f8cedcff

solution

** Raise the version of wget! ** **

# weget --version
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 -L/usr/lib6464 -lssl -lcrypto 
    -ldl -lz /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 (C) 2009 Free Software Foundation, Inc.
License GPLv3+:GNU GPL version 3 or later
<http://www.gnu.org/licenses/gpl.html>.
This software is free software. You can freely change and redistribute it.
As far as the law allows, there is no guarantee.

Hrvoje Niksic <[email protected]>Written by
Currently Micah Cowan<[email protected]>Is maintained by.
For bug reports and questions<[email protected]>What

I will upgrade the version!

# yum update wget
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: ftp.iij.ad.jp
 * extras: ftp.iij.ad.jp
 * updates: ftp.iij.ad.jp
base                                                                                          | 3.7 kB     00:00     
extras                                                                                        | 3.4 kB     00:00     
updates                                                                                       | 3.4 kB     00:00     
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package wget.x86_64 0:1.12-1.8.el6 will be updated
---> Package wget.x86_64 0:1.12-10.el6 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

=====================================================================================================================
 Package                  Arch                       Version                          Repository                Size
=====================================================================================================================
Updating:
 wget                     x86_64                     1.12-10.el6                      base                     484 k

Transaction Summary
=====================================================================================================================
Upgrade       1 Package(s)

Total download size: 484 k
Is this ok [y/N]: y
Downloading Packages:
wget-1.12-10.el6.x86_64.rpm                                                                   | 484 kB     00:00     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating   : wget-1.12-10.el6.x86_64 [                                                                       ] 1/2  Updating   : wget-1.12-10.el6.x86_64 [##                                                                     ] 1/2  Updating   : wget-1.12-10.el6.x86_64 [####                                                                   ] 1/2  Updating   : wget-1.12-10.el6.x86_64 [#######                                                                ] 1/2  Updating   : wget-1.12-10.el6.x86_64 [#########                                                              ] 1/2  Updating   : wget-1.12-10.el6.x86_64 [############                                                           ] 1/2  Updating   : wget-1.12-10.el6.x86_64 [#############                                                          ] 1/2  Updating   : wget-1.12-10.el6.x86_64 [##############                                                         ] 1/2  Updating   : wget-1.12-10.el6.x86_64 [###############                                                        ] 1/2  Updating   : wget-1.12-10.el6.x86_64 [################                                                       ] 1/2  Updating   : wget-1.12-10.el6.x86_64 [##################                                                     ] 1/2  Updating   : wget-1.12-10.el6.x86_64 [###################                                                    ] 1/2  Updating   : wget-1.12-10.el6.x86_64 [#####################                                                  ] 1/2  Updating   : wget-1.12-10.el6.x86_64 [######################                                                 ] 1/2  Updating   : wget-1.12-10.el6.x86_64 [#######################                                                ] 1/2  Updating   : wget-1.12-10.el6.x86_64 [########################                                               ] 1/2  Updating   : wget-1.12-10.el6.x86_64 [#########################                                              ] 1/2  Updating   : wget-1.12-10.el6.x86_64 [##########################                                             ] 1/2  Updating   : wget-1.12-10.el6.x86_64 [#############################                                          ] 1/2  Updating   : wget-1.12-10.el6.x86_64 [###############################                                        ] 1/2  Updating   : wget-1.12-10.el6.x86_64 [################################                                       ] 1/2  Updating   : wget-1.12-10.el6.x86_64 [#################################                                      ] 1/2  Updating   : wget-1.12-10.el6.x86_64 [##################################                                     ] 1/2  Updating   : wget-1.12-10.el6.x86_64 [####################################                                   ] 1/2  Updating   : wget-1.12-10.el6.x86_64 [######################################                                 ] 1/2  Updating   : wget-1.12-10.el6.x86_64 [#######################################                                ] 1/2  Updating   : wget-1.12-10.el6.x86_64 [#########################################                              ] 1/2  Updating   : wget-1.12-10.el6.x86_64 [############################################                           ] 1/2  Updating   : wget-1.12-10.el6.x86_64 [#############################################                          ] 1/2  Updating   : wget-1.12-10.el6.x86_64 [###############################################                        ] 1/2  Updating   : wget-1.12-10.el6.x86_64 [################################################                       ] 1/2  Updating   : wget-1.12-10.el6.x86_64 [###################################################                    ] 1/2  Updating   : wget-1.12-10.el6.x86_64 [####################################################                   ] 1/2  Updating   : wget-1.12-10.el6.x86_64 [#####################################################                  ] 1/2  Updating   : wget-1.12-10.el6.x86_64 [########################################################               ] 1/2  Updating   : wget-1.12-10.el6.x86_64 [##########################################################             ] 1/2  Updating   : wget-1.12-10.el6.x86_64 [###########################################################            ] 1/2  Updating   : wget-1.12-10.el6.x86_64 [#############################################################          ] 1/2  Updating   : wget-1.12-10.el6.x86_64 [###############################################################        ] 1/2  Updating   : wget-1.12-10.el6.x86_64 [################################################################       ] 1/2  Updating   : wget-1.12-10.el6.x86_64 [##################################################################     ] 1/2  Updating   : wget-1.12-10.el6.x86_64 [####################################################################   ] 1/2  Updating   : wget-1.12-10.el6.x86_64 [#####################################################################  ] 1/2  Updating   : wget-1.12-10.el6.x86_64 [###################################################################### ] 1/2  Updating   : wget-1.12-10.el6.x86_64                                                                           1/2 
  Cleanup    : wget-1.12-1.8.el6.x86_64                                                                          2/2 
  Verifying  : wget-1.12-10.el6.x86_64                                                                           1/2 
  Verifying  : wget-1.12-1.8.el6.x86_64                                                                          2/2 

Updated:
  wget.x86_64 0:1.12-10.el6                                                                                          

Complete!

wget! !!

# wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup--cookie" https://download.oracle.com/otn-pub/java/jdk/8u152-b16/aa0333dd3019491ca4f6ddbe78cdb6d0/jdk-8u152-linux-x64.rrpmversion

lsrm -rf *llslwget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup--cookie" http://download.oracle.com/otn-pub/java/jdk/8u152-b16/aa0333dd3019491ca4f6ddbe78cdb6d0/jdk-8u152-linux-x64.rppm
--2017-11-13 13:46:43--  http://download.oracle.com/otn-pub/java/jdk/8u152-b16/aa0333dd3019491ca4f6ddbe78cdb6d0/jdk-8u152-linux-x64.rpm
download.oracle.Querying com to DNS... 211.131.224.80, 211.131.224.72
download.oracle.com|211.131.224.80|:Connecting to 80...Connected.
Sent a connection request via HTTP, waiting for a response... 302 Moved Temporarily
place: https://edelivery.oracle.com/otn-pub/java/jdk/8u152-b16/aa0333dd3019491ca4f6ddbe78cdb6d0/jdk-8u152-linux-x64.rpm [Continue]
--2017-11-13 13:46:43--  https://edelivery.oracle.com/otn-pub/java/jdk/8u152-b16/aa0333dd3019491ca4f6ddbe78cdb6d0/jdk-8u152-linux-x64.rpm
edelivery.oracle.Querying com to DNS... 23.2.38.98, 2600:140b:2000:28e::2d3e, 2600:140b:2000:293::2d3e
edelivery.oracle.com|23.2.38.98|:Connecting to 443...Connected.
Sent a connection request via HTTP, waiting for a response... 302 Moved Temporarily
place: http://download.oracle.com/otn-pub/java/jdk/8u152-b16/aa0333dd3019491ca4f6ddbe78cdb6d0/jdk-8u152-linux-x64.rpm?AuthParam=1510548523_304d55b73fbd32bfa8616b87a52731da [Continue]
--2017-11-13 13:46:43--  http://download.oracle.com/otn-pub/java/jdk/8u152-b16/aa0333dd3019491ca4f6ddbe78cdb6d0/jdk-8u152-linux-x64.rpm?AuthParam=1510548523_304d55b73fbd32bfa8616b87a52731da
download.oracle.com|211.131.224.80|:Connecting to 80...Connected.
Sent a connection request via HTTP, waiting for a response... 200 OK
length: 174192082 (166M) [application/x-redhat-package-manager]
`jdk-8u152-linux-x64.rpm'Saving in

 0% [                                                                            ] 0           --.-K/s               6% [====>                                                                       ] 11,561,652  55.1M/s              12% [========>                                                                   ] 20,973,067  49.4M/s              20% [==============>                                                             ] 34,927,732  55.1M/s              28% [====================>                                                       ] 49,293,004  58.4M/s              38% [============================>                                               ] 66,969,140  63.5M/s              48% [===================================>                                        ] 84,469,356  66.8M/s              57% [==========================================>                                 ] 100,696,096 68.3M/s              68% [==================================================>                         ] 118,797,306 70.6M/s              77% [==========================================================>                 ] 135,296,506 71.5M/s              86% [=================================================================>          ] 151,458,322 71.9M/s              96% [========================================================================>   ] 167,691,882 72.4M/s              100%[===========================================================================>] 174,192,082 72.9M/s time 2.3s    

2017-11-13 13:46:46 (72.9 MB/s) - `jdk-8u152-linux-x64.rpm'Save to[174192082/174192082]

Verification!

# ls
jdk-8u152-linux-x64.rpm

I was able to download it properly.

Recommended Posts

Problems that cannot be wget. (Warning: The name `www.oracle.com'on the certificate and the host name ʻedelivery.oracle.com' do not match)
Install Docker on CentOS8. The problem that the name could not be resolved was resolved.