From 7340d342ee581a65bf2ddd5ff53f2a76003c1514 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Wed, 24 Jun 2009 09:50:12 +0000 Subject: [PATCH] - Make sure we find https URIs from https backend (bug #507628). --- system-config-printer-https.patch | 29 +++++++++++++++++++++++++++++ system-config-printer.spec | 3 +++ 2 files changed, 32 insertions(+) create mode 100644 system-config-printer-https.patch diff --git a/system-config-printer-https.patch b/system-config-printer-https.patch new file mode 100644 index 0000000..25185a6 --- /dev/null +++ b/system-config-printer-https.patch @@ -0,0 +1,29 @@ +diff -up system-config-printer-1.1.8/system-config-printer.py.https system-config-printer-1.1.8/system-config-printer.py +--- system-config-printer-1.1.8/system-config-printer.py.https 2009-06-24 10:46:14.873192155 +0100 ++++ system-config-printer-1.1.8/system-config-printer.py 2009-06-24 10:46:25.057317039 +0100 +@@ -5431,7 +5431,13 @@ class NewPrinterGUI(GtkGUI): + (host, port) = urllib.splitnport (host, defport=port) + + try: +- c = cups.Connection (host=host, port=port) ++ if self.device.type == "https": ++ encrypt = cups.HTTP_ENCRYPT_ALWAYS ++ else: ++ encrypt = cups.HTTP_ENCRYPT_IF_REQUESTED ++ ++ c = cups.Connection (host=host, port=port, ++ encryption=encrypt) + printers = c.getPrinters () + del c + except cups.IPPError, (e, m): +@@ -5492,6 +5498,10 @@ class NewPrinterGUI(GtkGUI): + self.entNPTIPPHostname.set_text (match.group (2)) + self.entNPTIPPQueuename.set_text (match.group (3)) + ++ if self.device.type == "https" and uri.startswith ("ipp:"): ++ # Use https in our device URI for this printer. ++ uri = "https:" + uri[4:] ++ + self.lblIPPURI.set_text (uri) + self.lblIPPURI.show() + self.setNPButtons() diff --git a/system-config-printer.spec b/system-config-printer.spec index 0e30a55..e54994e 100644 --- a/system-config-printer.spec +++ b/system-config-printer.spec @@ -16,6 +16,7 @@ Source1: http://cyberelk.net/tim/data/pycups/pycups-%{pycups_version}.tar.bz2 Source2: http://cyberelk.net/tim/data/pysmbc/pysmbc-%{pysmbc_version}.tar.bz2 Patch1: system-config-printer-bug507489.patch Patch2: system-config-printer-ipp-nonfatal-exception.patch +Patch3: system-config-printer-https.patch BuildRequires: cups-devel >= 1.2 BuildRequires: python-devel >= 2.4 @@ -67,6 +68,7 @@ the configuration tool. %setup -q -a 1 -a 2 %patch1 -p1 -b .bug507489 %patch2 -p1 -b .ipp-nonfatal-exception +%patch3 -p1 -b .https %build %configure @@ -170,6 +172,7 @@ exit 0 %changelog * Wed Jun 24 2009 Tim Waugh 1.1.8-2 +- Make sure we find https URIs from https backend (bug #507628). - Avoid showing a non-fatal exception when adding an IPP printer (bug #507629). - Fixed traceback when adding/modifying printer which could lead to