From: Michael R Sweet Date: Tue, 10 Nov 2020 01:27:13 +0000 (-0500) Subject: Fix the "uri-security-supported" value to be based on the current connection X-Git-Tag: v2.3.3op1~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=26e085bfd0594dc766caa5760d612f94810ca9c8;p=thirdparty%2Fcups.git Fix the "uri-security-supported" value to be based on the current connection (Issue #42) --- diff --git a/CHANGES-OPENPRINTING.md b/CHANGES-OPENPRINTING.md index a13d25616b..44e3da6866 100644 --- a/CHANGES-OPENPRINTING.md +++ b/CHANGES-OPENPRINTING.md @@ -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) diff --git a/scheduler/ipp.c b/scheduler/ipp.c index 68763a0f12..00ab92976d 100644 --- a/scheduler/ipp.c +++ b/scheduler/ipp.c @@ -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); diff --git a/scheduler/printers.c b/scheduler/printers.c index 60ea016da9..7e9a9f265c 100644 --- a/scheduler/printers.c +++ b/scheduler/printers.c @@ -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,