Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> ระบบ >> Windows 11

SSL Error: This Site Can’t Provide a Secure Connection ใน Chrome, Opera และ Chromium

ด้วยเหตุผลบางอย่าง ผมไม่สามารถเปิดบางเว็บไซต์ HTTPS (ไม่ใช่ทั้งหมด!) บน Laptop Windows 10 ได้ เมื่อพยายามเปิดเว็บไซต์ดังกล่าวใน Browser จะแสดง Error: This site can’t provide a secure connection เว็บไซต์ไม่แสดงใน Google Chrome, Opera และ Chromium-based Browsers โดยไม่มี HTTPS สามารถเปิดได้เฉพาะบางเว็บที่มีหน้าเว็บให้ทั้ง HTTP และ HTTPS หากพยายามเปิด HTTPS Website ที่มีปัญหาใน Chrome Error จะเป็น:

This site can’t provide a secure connection. sitename.com sent an invalid response. ERR_SSL_PROTOCOL_ERROR

SSL Error: This Site Can’t Provide a Secure Connection ใน Chrome, Opera และ Chromium

หรือแบบนี้:

This site can’t provide a secure connection. sitename.com uses an unsupported protocol. ERR_SSL_VERSION_OR_CIPHER_MISMATCH. The client and server don’t support a common SSL protocol version or cipher suite. This is likely to be caused when the server needs RC4, which is no longer considered secure.

SSL Error: This Site Can’t Provide a Secure Connection ใน Chrome, Opera และ Chromium

ใน Mozilla Firefox:

Secure Connection Failed

Opera และ Chromium-based Browsers Error คล้ายกัน แก้อย่างไรให้เปิด HTTPS Websites ได้?

คำตอบ

ปัญหานี้เกี่ยวกับ SSL Connection ระหว่าง Browser และ HTTPS Website เหตุผลอาจหลากหลาย บทความนี้รวบรวมวิธีแก้ Error “This site can’t provide a secure connection, ERR_SSL_PROTOCOL_ERROR” ใน Browser ยอดนิยม

ขอชี้แจงว่า Google Chrome, Opera และ Chromium-based Browsers แม้มาจากบริษัทต่างกัน แต่ใช้ Engine เดียวกันคือ WebKit (Chromium) ปัญหาเปิด HTTPS Sites แก้ได้เหมือนกันทุกตัว

ก่อนอื่น ตรวจสอบว่าไม่ใช่ปัญหาของ HTTPS Website เอง ลองเปิดจากอุปกรณ์อื่น (Smartphone, Tablet, PC อื่น) ตรวจสอบว่าเปิดเว็บที่มีปัญหาได้ใน Browser อื่น: IE/Edge หรือ Firefox ไหม

ล้าง Browser Cache, Cookies และ Reset SSL Cache

Browser Cache และ Cookies มักก่อให้เกิด SSL Certificate Issues แนะนำล้าง Cache และ Cookies ก่อน ใน Chrome กด Ctrl + Shift + Delete (หรือไป chrome://settings/clearBrowserData) เลือก Time Range All time คลิก Clear data

SSL Error: This Site Can’t Provide a Secure Connection ใน Chrome, Opera และ Chromium

ล้าง SSL Cache ใน Windows 10/11:

  1. ไป Control Panel -> Internet Options;
  2. แท็บ Content;
  3. คลิก Clear SSL State;
  4. จะแสดง “The SSL cache was successfully cleared”;
  5. Restart Browser และตรวจสอบว่า ERR_SSL_PROTOCOL_ERROR ยังคงอยู่หรือไม่

SSL Error: This Site Can’t Provide a Secure Connection ใน Chrome, Opera และ Chromium

ปิด Third-Party Browser Extensions

แนะนำ Disable (Delete) Third-party Extensions โดยเฉพาะ Anonymizers, Proxies, VPNs, Antivirus Extensions และ Add-ons เหมือนกันที่อาจรบกวน Traffic ไปยัง Target Website ดู Extensions ที่เปิดอยู่ใน Chrome: Settings -> More Tools -> Extensions หรือ chrome://extensions/ Disable Extensions ที่น่าสงสัย

SSL Error: This Site Can’t Provide a Secure Connection ใน Chrome, Opera และ Chromium

ตรวจสอบ Antivirus และ Firewall Settings

หากมี Antivirus หรือ Firewall (มัก Built-in ใน Antivirus) ติดตั้ง อาจบล็อกการเข้าถึงเว็บไซต์ ลอง Pause Antivirus/Firewall ชั่วคราวเพื่อทดสอบ

Antivirus หลายตัวมี Module ตรวจสอบ SSL/TLS Certificates ของเว็บไซต์ หากตรวจพบว่าเว็บใช้ Insecure/Self-signed Certificate หรือ Legacy SSL Protocol (SSL 3.0, TLS 1.0) อาจบล็อกการเข้าถึง ลองปิด Scanning HTTP/HTTPS Traffic และ SSL Certificates ใน Antivirus ต่างๆ ชื่อ Option ต่างกัน เช่น:

  • ปิด “Enable SSL/TLS protocol filtering” ใน ESET NOD32; SSL Error: This Site Can’t Provide a Secure Connection ใน Chrome, Opera และ Chromium
  • ใน Avast ชื่อ “Enable HTTPS scanning” (Settings -> Active Protection -> Web Shield -> Customize -> Main Settings); SSL Error: This Site Can’t Provide a Secure Connection ใน Chrome, Opera และ Chromium
  • Firewall Built-in (Spider Gate) ใน Dr.Web อาจบล็อกเว็บ;
  • ใน Kaspersky Internet Security: Settings -> Advanced -> Network -> เพิ่มเว็บใน Exclusions หรือเลือก Do not scan encrypted connections SSL Error: This Site Can’t Provide a Secure Connection ใน Chrome, Opera และ Chromium

ตรวจสอบ Date & Time Settings

Date, Time (หรือ Time Zone) ผิดบนคอมพิวเตอร์ก็ทำให้ Secure Connection Error บน HTTPS Websites ได้ ระหว่าง Authentication OS ตรวจสอบวันที่สร้าง Certificate, Expire Date และ CA Certificate Expire Date

ตรวจสอบให้ Time และ Time Zone ถูกต้อง หาก Time Reset ตลอด ให้ดูบทความ “Windows displays wrong time after reboot”

อัปเดต Windows Root Certificates

หากเครื่องอยู่ใน Isolated Network, ไม่อัปเดตนาน, หรือปิด Auto Update อาจขาด Trusted Root Certificates (TrustedRootCA) ใหม่ แนะนำติดตั้ง Security Updates ล่าสุดใน Windows เสมอ

อัปเดต Trusted Root Certificates Manual ได้ตามบทความ “Updating List of Trusted Root Certificates in Windows” ตรวจสอบ Certificate ที่น่าสงสัย/ไไม่น่าเชื่อถือด้วย SigCheck ช่วยป้องกันการจับ HTTPS Traffic และปัญหาอื่นๆ

ปิด QUIC Protocol Support

ตรวจสอบว่า QUIC (Quick UDP Internet Connections) Protocol Support เปิดอยู่ใน Chrome QUIC ช่วยตั้งค่า Connection และ Negotiate TLS (HTTPS) Parameters เร็วขึ้น แต่บางครั้งก่อให้เกิด SSL Connection Problems ลองปิด QUIC:

  1. ไป chrome://flags/#enable-quic;
  2. หา Experimental QUIC protocol;
  3. เปลี่ยนจาก Default เป็น Disabled;
  4. Restart Chrome

SSL Error: This Site Can’t Provide a Secure Connection ใน Chrome, Opera และ Chromium

ตรวจสอบ TLS/SSL Protocols ที่ Browser และ Web Server รองรับ

เช็ค TLS/SSL Versions และ Cipher Suites ที่ Browser รองรับ: ไปที่ https://clienttest.ssllabs.com:8443/ssltest/viewMyClient.html

SSL Labs Online Service จะคืนรายการ Protocols และ Cipher Suites ที่ Browser รองรับ ตัวอย่าง Chrome รองรับแค่ TLS 1.3 และ TLS 1.2 โปรโตคอลอื่น (TLS 1.1, TLS 1.0, SSL3, SSL 2) Disabled ทั้งหมด ด้านล่างคือรายการ Encryption Methods

Cipher Suites (in order of preference)

  • TLS_AES_128_GCM_SHA256
  • TLS_CHACHA20_POLY1305_SHA256
  • TLS_AES_256_GCM_SHA384
  • TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
  • TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
  • TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256
  • TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256
  • TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
  • TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
  • TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
  • TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
  • TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA
  • TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
  • TLS_RSA_WITH_AES_128_GCM_SHA256
  • TLS_RSA_WITH_AES_256_GCM_SHA384
  • TLS_RSA_WITH_AES_128_CBC_SHA
  • TLS_RSA_WITH_AES_256_CBC_SHA

SSL Error: This Site Can’t Provide a Secure Connection ใน Chrome, Opera และ Chromium

รายการ Cipher Suites ทั้งหมดที่ Enable ใน Windows ดูได้ด้วย PowerShell:

Get-TlsCipherSuite | Format-Table -Property CipherSuite, Name

จากนั้นเช็ค TLS/SSL Protocols ที่ Website รองรับ: ใช้ SSL Checker Online https://www.ssllabs.com/ssltest/analyze.html?d=domain.com (แทน domain.com ด้วยเว็บที่ต้องการ)

เช็คว่า TLS/SSL Versions ที่ Website รองรับ มีใน Browser ครบหรือไม่

ตัวอย่าง: เว็บไม่รองรับ TLS 3.1, SSL 3.0, SSL 2.0 เปรียบเทียบ Cipher Suite List

SSL Error: This Site Can’t Provide a Secure Connection ใน Chrome, Opera และ Chromium

หาก Encryption Method ไม่รองรับใน Browser อาจต้อง Enable ใน Windows

หาก Website ไม่รองรับ SSL Protocols ที่ Client ต้องการ จะเจอ Error “This site cannot provide a secure connection” ตอนเชื่อมต่อ HTTPS

เปิดใช้งาน Legacy TLS/SSL Protocols

สิ่งสุดท้าย – อาจเพียง Enable Legacy TLS/SSL Protocols ก็แก้ปัญหาได้ ในกรณีส่วนใหญ่เป็นวิธีที่ Effective ที่สุด แต่ผมวางไว้ท้ายบทความเจตนา จะอธิบายว่าทำไม

Outdated TLS/SSL Protocols ถูก Disable ไม่ใช่แค่ Developer ต้องการ แต่เพราะ Vulnerabilities มากมายที่ให้ Hackers จับข้อมูลใน HTTPS Traffic หรือแก้ไขได้ การ Enable Legacy Protocols โดยไม่คิด ส่งผลต่อ Security บน Internet จึงไม่ควรใช้วิธีนี้ เว้นแต่ไม่มีทางอื่นช่วย

บน Browser และ OS สมัยใหม่ Legacy และ Vulnerable SSL/TLS Protocols ถูก Disable By Default (SSL 2.0, SSL 3.0, TLS 1.1) ปัจจุบันแนะนำใช้แค่ TLS 1.2 หรือ TLS 1.3 สำหรับ SSL Connections

หาก Web Server ใช้ SSL/TLS Protocol Version เก่ากว่าที่ Client รองรับ User จะเห็น Error ตอน Secure Connection ERR_SSL_VERSION_OR_CIPHER_MISMATCH Error นี้เกิดเมื่อ Client ใน TLS Handshake Stage ตรวจพบว่า Site ใช้ Encryption Protocol หรือ Key Length ที่ Browser ไม่รองรับ ข้างต้นแสดงวิธีเช็ค Protocols และ Ciphers ที่ Server รองรับ

เพื่ออนุญาต Legacy SSL/TLS Protocols บน Windows (โปรดทราบอีกครั้งว่าไม่ปลอดภัย!):

  1. เปิด Control Panel -> Internet Options;
  2. แท็บ Advanced;
  3. Enable TLS 1.0, TLS 1.1 และ TLS 1.2 (หากไม่ช่วย Enable SSL 3.0, 2.0 ด้วย); SSL Error: This Site Can’t Provide a Secure Connection ใน Chrome, Opera และ Chromium
  4. Restart Browser

หากวิธีข้างต้นไม่ช่วย ลอง:

  • ตรวจสอบว่าไม่มี Static Records ใน C:\Windows\System32\drivers\etc\host Hosts File ใช้บล็อก Domains/Websites ได้: Get-Content $env:SystemRoot\System32\Drivers\etc\hosts;
  • ลอง Public DNS เช่น Google DNS (8.8.8.8) ใน Network Settings;
  • ใน Control Panel -> Internet Options ตรวจสอบ Security Level สำหรับ Internet Zone เป็น Medium-high หรือ Medium หากเป็น High บาง SSL Connections อาจถูกบล็อก; SSL Error: This Site Can’t Provide a Secure Connection ใน Chrome, Opera และ Chromium
  • ตรวจสอบ Site Certificate ด้วย Online SSL Checker;
  • หากใช้ VPN หรือ Proxy ใน Windows Settings ลองปิด;
  • ตรวจสอบ TLS 1.3 Enabled ใน Chrome: ไป chrome://flags ค้นหา TLS 1.3 ตั้งเป็น Enabled หรือ Default หาก Disabled ให้ Enable; SSL Error: This Site Can’t Provide a Secure Connection ใน Chrome, Opera และ Chromium
  • หากใช้ Legacy OS (Windows XP/7) ติดตั้ง Mozilla Firefox แทน Chrome เนื่องจาก Firefox ใช้ SSL/TLS Implementation ของตัวเอง ไม่ใช่ Built-in ของ Windows