[X509: CERT_ALREADY_IN_HASH_TABLE] cert already in hash table (_ssl.c:2635) #1996
-
Using proxy through It feels like sharing the same variable (hash table) in the same thread proxy use examples: proxies = 'http://...' # note: http proxy
async httpx.AsyncClient(proxies=proxies) as client:
# The target website is `https`.
# post upload file
resp = await client.post('https://...', files=...) system:CentOS Linux release 7.7.1908 (Core)
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I also encountered this problem and investigated it.
The CPython SSL module calls the OpenSSL function X509_STORE_ add_cert. When X509_R_CERT_ALREADY_IN_HASH_TABLE appears, before OpenSSL 1.1.1, X509_STORE_ add_cert returns 0 to indicate failure, and since OpenSSL 1.1.1 returns 1 to indicate success. Solution
|
Beta Was this translation helpful? Give feedback.
I also encountered this problem and investigated it.
https://bugs.ruby-lang.org/issues/11033
ruby/openssl@v2.0.3...v2.0.4
https://github.com/openssl/openssl/pull/2830/files
Before 1.1.1 return 0, Since 1.1.1 return 1
https://github.com/python/cpython/blob/main/Modules/_ssl.c#L4018
The CPython SSL module calls the OpenSSL function X509_STORE_ add_cert. When X509_R_CERT_ALREADY_IN_HASH_TABLE appears, before OpenSSL 1.1.1, X509_STORE_ add_cert returns 0 to indicate failure, and since OpenSSL 1.1.1 returns 1 to indicate success.
Solution