pycurl gives 'gnutls_handshake() warning: The server name sent was not recognized', curl on command line and wget work with same URL
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pycurl (Ubuntu) |
New
|
High
|
Unassigned | ||
Trusty |
New
|
High
|
Unassigned | ||
Utopic |
Won't Fix
|
High
|
Unassigned | ||
system-config-printer (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Trusty |
Fix Released
|
High
|
Unassigned | ||
Utopic |
Fix Released
|
High
|
Unassigned |
Bug Description
From a Python program (system-
A typical URL sent by system-
The "https://..." allows for checking whether the answer really comes from OpenPrinting. It is no problem accessing this URL with a browser or by the command line:
In all cases I get an XML data set in a reasonable amount of time (so server performance is OK). The XML data set tells about a driver package from Epson with all info to download it and to establish automatic updates via the facilities of the distro. RPM- and DEB-based distros with 32-bit or 64-bit Intel architectures are supported.
system-
----------
import pycurl
def collect_
print(result)
return len(result)
curl = pycurl.Curl()
curl.setopt(
curl.setopt(
curl.setopt(
curl.setopt(
status = curl.perform()
repr(status)
quit()
----------
You can paste the lines into a text editor to get a Python program or run "python" or "python3" (Python version seems not to matter) and paste the bunch of lines to the prompt.
The result is always the same, the "status = curl.perform()" line gives:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
pycurl.error: (51, 'gnutls_handshake() warning: The server name sent was not recognized')
For me it looks like that something has changed, as formerly this Python code worked correctly.
If I change "https://..." to "http://..." all works correctly and I get the XML data, but then there is no verification any more that the communication is really done with OpenPrinting.
See also
http://
This all looks like a bug in pycurl.
Changed in system-config-printer (Ubuntu): | |
status: | New → Fix Released |
importance: | Undecided → High |
tags: |
added: verification-done-trusty removed: verification-done |
Changed in system-config-printer (Ubuntu Trusty): | |
status: | In Progress → Fix Committed |
The problem occurs on Trusty, Utopic, and Vivid.
Added a task for system- config- printer for using python-requests instead of pycurl as a workaround. Note that this does not fix the problem of pycurl.