python / python/pythondotorg

Bug: Website SSL certificates invalid for some server IPv6 addresses

Open
#2,752 2 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
1.7k
Forks
700
Avg merge
2d 13h
Merged PRs (30d)
11

Description

Describe the bug

Unable to view docs.python.org using ipv6 due to incorrect name in ssl certificate. This appears to be an issue with the particular IP address as using a different IPv6 address (obtained via google's public DNS) works.

See also https://github.com/pypi/support/issues/6959 for the same issue with files.pythonhosted.org

To Reproduce

Browse to https://docs.python.org/ returns an invalid certificate.

>  curl -6 -v https://docs.python.org/
* Host docs.python.org:443 was resolved.
* IPv6: 2a04:4e42:d000::223
* IPv4: (none)
*   Trying [2a04:4e42:d000::223]:443...
* schannel: disabled automatic use of client certificate
* ALPN: curl offers http/1.1
* schannel: SNI or certificate check failed: SEC_E_WRONG_PRINCIPAL (0x80090322) - The target principal name is incorrect.
* closing connection #0
curl: (60) schannel: SNI or certificate check failed: SEC_E_WRONG_PRINCIPAL (0x80090322) - The target principal name is incorrect.
More details here: https://curl.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the webpage mentioned above.
Expected behavior

Website returns the correct certificate. e.g.:

  curl -v https://docs.python.org/ --resolve 'docs.python.org:443:2a04:4e42:200::223'
* Added docs.python.org:443:2a04:4e42:200::223 to DNS cache
* Hostname docs.python.org was found in DNS cache
*   Trying [2a04:4e42:200::223]:443...
* schannel: disabled automatic use of client certificate
* ALPN: curl offers http/1.1
* ALPN: server accepted http/1.1
* Connected to docs.python.org (2a04:4e42:200::223) port 443
* using HTTP/1.x
> GET / HTTP/1.1
> Host: docs.python.org
> User-Agent: curl/8.11.1
> Accept: */*
>
* schannel: remote party requests renegotiation
* schannel: renegotiating SSL/TLS connection
* schannel: SSL/TLS connection renegotiated
* Request completely sent off
< HTTP/1.1 302 Moved Temporarily
< Connection: keep-alive
< Content-Length: 138
< server: nginx
< content-type: text/html
< location: https://docs.python.org/3/
< x-clacks-overhead: GNU Terry Pratchett
< strict-transport-security: max-age=315360000; includeSubDomains; preload
< Via: 1.1 varnish, 1.1 varnish
< Accept-Ranges: bytes
< Age: 596713
< Date: Tue, 15 Jul 2025 09:44:55 GMT
< X-Served-By: cache-lga21989-LGA, cache-lhr-egll1980038-LHR
< X-Cache: HIT, HIT
< X-Cache-Hits: 66, 0
< X-Timer: S1752572696.884347,VS0,VE1
<
<html>
<head><title>302 Found</title></head>
<body>
<center><h1>302 Found</h1></center>
<hr><center>nginx</center>
</body>
</html>
* Connection #0 to host docs.python.org left intact
URL to the issue

No response

Screenshots
Certificate returned (according to Chrome):

Subject: default.ssl.fastly.net

Issuer: GlobalSign RSA OV SSL CA 2018

Expires on: 2 Jun 2026

Current date: 15 Jul 2025

PEM encoded chain:
-----BEGIN CERTIFICATE-----
MIIGvTCCBaWgAwIBAgIMd09EvXDMOQx/ji/kMA0GCSqGSIb3DQEBCwUAMFAxCzAJ
BgNVBAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMSYwJAYDVQQDEx1H
bG9iYWxTaWduIFJTQSBPViBTU0wgQ0EgMjAxODAeFw0yNTA1MDExNjI2MDhaFw0y
NjA2MDIxNjI2MDdaMHIxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlh
MRYwFAYDVQQHEw1TYW4gRnJhbmNpc2NvMRUwEwYDVQQKEwxGYXN0bHksIEluYy4x
HzAdBgNVBAMTFmRlZmF1bHQuc3NsLmZhc3RseS5uZXQwggEiMA0GCSqGSIb3DQEB
AQUAA4IBDwAwggEKAoIBAQDH8Jwi3G6LDp5A27g9xWWXIvWCFOMN8Fk7gIgn9YeQ
S/MXUy9dsL3RyrvG25loyxgumAX2+u7uqSGqfc2MnsOelLEPyyrjin6+cPn7EjL9
lKhMmPQeD5N47WA8RBVW6yN3g2dHYkK/ahEKjKVe4/slhSR/uvhyCkShLV+vM6FQ
xQbdu8YnDTX/wxWA2k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j+1EbddTKJd+82cEHhXXipa0095MJ6RMG3NzdvQX
mcIfeg7jLQitChws/zyrVQ4PkX4268NXSb7hLi18YIvDQVETI53O9zJrlAGomecs
Mx86OyXShkDOOyyGeMlhLxS67ttVb9+E7gUJTb0o2HLO02JQZR7rkpeDMdmztcpH
WD9f
-----END CERTIFICATE-----
Browsers

Chrome

Operating System

Windows

Browser Version

138.0.7204.100

Relevant log output

Additional context

No response

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No repository file, test, or entry point is identified. Start by reproducing the failure with curl -6 -v https://docs.python.org/ and compare it with the working IPv6 address shown in the issue. Done means the affected IPv6 endpoints return a certificate valid for docs.python.org.

Written by the indexing model from the issue text.

Assessment

Domain
infrastructure, networking, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.