View Single Post
Old 08-15-2023, 02:27 PM   #1
Ybother
Junior Member
Ybother began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Aug 2023
Device: None
SSL issues with metadata download

I've looked through the forum and have found other similar questions about this topic. But seeing as I'm in an awkward place here, I'm going to re-ask with the details pertinent to my specific problem.

I'm running Calibre portable 6.24
When I try to download metadata, the query fails. Logs show the following:

Quote:

Running identify query with parameters:
{'title': 'The Adventures of Sherlock Holmes', 'authors': ['Sir Arthur Conan Doyle'], 'identifiers': {'uri': 'http://www.gutenberg.org/ebooks/1661'}, 'timeout': 30}
Using plugins: Google (1, 1, 1), Amazon.com (1, 3, 5), Edelweiss (2, 0, 1)
The log from individual plugins is below

****************************** Google (1, 1, 1) ******************************
Found 0 results
Downloading from Google took 1.3675224781036377
Making query: https://books.google.com/books/feeds...ewability=none
Failed to make identify query: 'https://books.google.com/books/feeds/volumes?q=intitle%3AAdventures+intitle%3Aof+intitl e%3ASherlock+intitle%3AHolmes%2Binauthor%3ASir+ina uthor%3AArthur+inauthor%3AConan+inauthor%3ADoyle&m ax-results=20&start-index=1&min-viewability=none'
Traceback (most recent call last):
File "mechanize\_urllib2_fork.py", line 1236, in do_open
File "http\client.py", line 1282, in request
File "http\client.py", line 1328, in _send_request
File "http\client.py", line 1277, in endheaders
File "http\client.py", line 1037, in _send_output
File "http\client.py", line 975, in send
File "http\client.py", line 1454, in connect
File "ssl.py", line 512, in wrap_socket
File "ssl.py", line 1070, in _create
File "ssl.py", line 1341, in do_handshake
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: EE certificate key too weak (_ssl.c:997)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "calibre\ebooks\metadata\sources\google.py", line 515, in make_query
File "mechanize\_mechanize.py", line 241, in open_novisit
File "mechanize\_mechanize.py", line 287, in _mech_open
File "mechanize\_opener.py", line 193, in open
File "mechanize\_urllib2_fork.py", line 425, in _open
File "mechanize\_urllib2_fork.py", line 414, in _call_chain
File "calibre\utils\browser.py", line 28, in https_open
File "mechanize\_urllib2_fork.py", line 1240, in do_open
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: EE certificate key too weak (_ssl.c:997)>

************************************************** ******************************
(The Amazon and Edelweiss queries fail with the same error, so for brevity I didn't post them)

I'm working from behind a firewall/content filter that parses SSL, similar to what some AV software does. I have no way to turn this off or add an exception, as this is not managed by me.

The firewall re-signs the traffic using its own CA certificate, which I have.
Is there a way to set Calibre to use that CA to accept the resigned SSL queries?
Ybother is offline   Reply With Quote