]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix the "uri-security-supported" value to be based on the current connection
authorMichael R Sweet <msweet@msweet.org>
Tue, 10 Nov 2020 01:27:13 +0000 (20:27 -0500)
committerMichael R Sweet <msweet@msweet.org>
Tue, 10 Nov 2020 01:27:13 +0000 (20:27 -0500)
(Issue #42)

CHANGES-OPENPRINTING.md
scheduler/ipp.c
scheduler/printers.c

index a13d25616b55db95b6c562ef0f54debc4a99915b..44e3da686647396c61ab5965f243ac67bbd0105a 100644 (file)
@@ -45,6 +45,7 @@ Changes in CUPS v2.3.3op1
 - Fixed remote access to the cupsd.conf and log files (Issue #24)
 - Fixed fax phone number handling with GNOME (Issue #40)
 - Fixed potential rounding error in rastertopwg filter (Issue #41)
+- Fixed the "uri-security-supported" value from the scheduler (Issue #42)
 - Fixed IPP backend crash bug with "printer-alert" values (Issue #43)
 - Fixed crash in rastertopwg (Apple issue #5773)
 - Fixed cupsManualCopies values in IPP Everywhere PPDs (Apple issue #5807)
index 68763a0f123abab7dae5220ad76263b5a1082a65..00ab92976d09b3ec2682faa844a6aa3491db5a0f 100644 (file)
@@ -1,6 +1,7 @@
 /*
  * IPP routines for the CUPS scheduler.
  *
+ * Copyright © 2020 by Michael R Sweet
  * Copyright © 2007-2019 by Apple Inc.
  * Copyright © 1997-2007 by Easy Software Products, all rights reserved.
  *
@@ -5016,6 +5017,9 @@ copy_printer_attrs(
   if (!ra || cupsArrayFind(ra, "queued-job-count"))
     add_queued_job_count(con, printer);
 
+  if (!ra || cupsArrayFind(ra, "uri-security-supported"))
+    ippAddString(con->response, IPP_TAG_PRINTER, IPP_TAG_KEYWORD, "uri-security-supported", NULL, is_encrypted ? "tls" : "none");
+
   copy_attrs(con->response, printer->attrs, ra, IPP_TAG_ZERO, 0, NULL);
   if (printer->ppd_attrs)
     copy_attrs(con->response, printer->ppd_attrs, ra, IPP_TAG_ZERO, 0, NULL);
index 60ea016da9edb575ce88febac1f502944f8fbf2a..7e9a9f265cf6864a75cb44073e550d139fb798cb 100644 (file)
@@ -1,6 +1,7 @@
 /*
  * Printer routines for the CUPS scheduler.
  *
+ * Copyright © 2020 by Michael R Sweet
  * Copyright © 2007-2019 by Apple Inc.
  * Copyright © 1997-2007 by Easy Software Products, all rights reserved.
  *
@@ -2319,8 +2320,6 @@ cupsdSetPrinterAttrs(cupsd_printer_t *p)/* I - Printer to setup */
 
   ippAddString(p->attrs, IPP_TAG_PRINTER, IPP_TAG_KEYWORD,
                "uri-authentication-supported", NULL, auth_supported);
-  ippAddString(p->attrs, IPP_TAG_PRINTER, IPP_TAG_KEYWORD,
-               "uri-security-supported", NULL, "none");
   if (p->printer_id)
     ippAddInteger(p->attrs, IPP_TAG_PRINTER, IPP_TAG_INTEGER, "printer-id", p->printer_id);
   ippAddString(p->attrs, IPP_TAG_PRINTER, IPP_TAG_NAME, "printer-name", NULL,