]> git.ipfire.org Git - thirdparty/cups.git/log
thirdparty/cups.git
2 years agoRemove unused variable cupsd_kqueue_changes 472/head
Rose [Mon, 12 Sep 2022 14:52:19 +0000 (10:52 -0400)] 
Remove unused variable cupsd_kqueue_changes

2 years agoFix certificate generation bugs that affect Chrome compatibility, among other things.
Michael R Sweet [Fri, 9 Sep 2022 23:25:43 +0000 (19:25 -0400)] 
Fix certificate generation bugs that affect Chrome compatibility, among other things.

2 years agoThe OpenSSL code path wasn't loading the full certificate chain (Issue #465)
Michael R Sweet [Mon, 5 Sep 2022 13:20:03 +0000 (09:20 -0400)] 
The OpenSSL code path wasn't loading the full certificate chain (Issue #465)

2 years agoMerge pull request #463 from zdohnal/actions_ubuntu22
zdohnal [Fri, 26 Aug 2022 09:45:18 +0000 (11:45 +0200)] 
Merge pull request #463 from zdohnal/actions_ubuntu22

github actions: Use Ubuntu 22.04 for Linux

2 years agogithub actions: Use Ubuntu 22.04 for Linux 463/head
Zdenek Dohnal [Fri, 26 Aug 2022 08:44:58 +0000 (10:44 +0200)] 
github actions: Use Ubuntu 22.04 for Linux

2 years agoscheduler/ipp.c: new lines for readability
Zdenek Dohnal [Fri, 26 Aug 2022 08:31:16 +0000 (10:31 +0200)] 
scheduler/ipp.c: new lines for readability

2 years agoUpdate CHANGES.md
Zdenek Dohnal [Fri, 26 Aug 2022 06:29:11 +0000 (08:29 +0200)] 
Update CHANGES.md

2 years agoMerge pull request #451 from zdohnal/change_defaults
zdohnal [Fri, 26 Aug 2022 06:01:26 +0000 (08:01 +0200)] 
Merge pull request #451 from zdohnal/change_defaults

scheduler/ipp.c: Convert incoming ColorModel attribute

2 years agoscheduler/ipp.c: Convert incoming ColorModel attribute 451/head
Zdenek Dohnal [Tue, 2 Aug 2022 08:38:21 +0000 (10:38 +0200)] 
scheduler/ipp.c: Convert incoming ColorModel attribute

If a client uses PPD option ColorModel (which is converted into
attribute to be sent via IPP) for changing the default color option
(which happens via CUPS-Add-Modify-Printer operation), we have to
convert ColorModel into print-color-mode attribute, so the
print-color-mode-default attribute gets updated.

The change survives reboot because print-color-mode is saved as an
option in printer's entry in /etc/cups/printers.conf.

2 years agoUpdate config.guess/sub to absolute latest from GNU Savannah config repo.
Michael R Sweet [Thu, 18 Aug 2022 12:20:30 +0000 (08:20 -0400)] 
Update config.guess/sub to absolute latest from GNU Savannah config repo.

2 years agoMerge pull request #458 from zdohnal/lprm_segfault
zdohnal [Tue, 16 Aug 2022 14:55:10 +0000 (16:55 +0200)] 
Merge pull request #458 from zdohnal/lprm_segfault

berkeley/lprm.c: Report error if -P doesn't have destination

2 years agoberkeley/lprm.c: Report error if -P doesn't have destination 458/head
Zdenek Dohnal [Tue, 16 Aug 2022 11:36:32 +0000 (13:36 +0200)] 
berkeley/lprm.c: Report error if -P doesn't have destination

Fixes #457

2 years agoUpdate CHANGES.md
Zdenek Dohnal [Tue, 16 Aug 2022 07:12:34 +0000 (09:12 +0200)] 
Update CHANGES.md

2 years agoMerge pull request #456 from zdohnal/lpoptions_root
Till Kamppeter [Mon, 15 Aug 2022 18:14:12 +0000 (20:14 +0200)] 
Merge pull request #456 from zdohnal/lpoptions_root

cups/dest.c: Write data into /etc/cups/lpoptions if we're root

2 years agoMerge pull request #455 from zdohnal/default_temp_queue
Till Kamppeter [Mon, 15 Aug 2022 17:38:19 +0000 (19:38 +0200)] 
Merge pull request #455 from zdohnal/default_temp_queue

cups/dest.c: Look for default printer on network as well

2 years agocups/dest.c: Write data into /etc/cups/lpoptions if we're root 456/head
Zdenek Dohnal [Mon, 15 Aug 2022 15:38:12 +0000 (17:38 +0200)] 
cups/dest.c: Write data into /etc/cups/lpoptions if we're root

Fixes #454 , the patch is created by Yair Yarom
(https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1008053).

2 years agosystemv/lpinfo.c: Remove username option from usage (Fixes #453)
Zdenek Dohnal [Mon, 15 Aug 2022 14:28:56 +0000 (16:28 +0200)] 
systemv/lpinfo.c: Remove username option from usage (Fixes #453)

2 years agocups/dest.c: Look for default printer on network as well 455/head
Zdenek Dohnal [Mon, 15 Aug 2022 14:04:50 +0000 (16:04 +0200)] 
cups/dest.c: Look for default printer on network as well

The current code of `cupsGetNamedDest()` doesn't look up on network for
a default printer. The result is a temporary queue cannot be set as a
default printer.

Fixes #452

2 years agoBump NuGet version.
Michael R Sweet [Wed, 10 Aug 2022 14:48:45 +0000 (10:48 -0400)] 
Bump NuGet version.

2 years agoDon't enable TLS 1.3 with OpenSSL yet.
Michael R Sweet [Wed, 10 Aug 2022 14:47:46 +0000 (10:47 -0400)] 
Don't enable TLS 1.3 with OpenSSL yet.

3 years agoMerge pull request #442 from zdohnal/godex_quirk
zdohnal [Fri, 5 Aug 2022 04:43:47 +0000 (06:43 +0200)] 
Merge pull request #442 from zdohnal/godex_quirk

Adds USB quirk for GoDEX label printers (fixes #440)

3 years agoAdds USB quirk for GoDEX label printers (fixes #440) 442/head
Zdenek Dohnal [Thu, 4 Aug 2022 13:43:08 +0000 (15:43 +0200)] 
Adds USB quirk for GoDEX label printers (fixes #440)

3 years agoUpdate NuGet/VC packages to use LibreSSL packages.
Michael R Sweet [Fri, 29 Jul 2022 17:41:18 +0000 (13:41 -0400)] 
Update NuGet/VC packages to use LibreSSL packages.

3 years agoRemove unused/unshipped strings2po utility that has potential security issues.
Michael R Sweet [Tue, 26 Jul 2022 11:39:41 +0000 (07:39 -0400)] 
Remove unused/unshipped strings2po utility that has potential security issues.

3 years agoCleanup for libtool fixes (Issue #394)
Michael R Sweet [Mon, 25 Jul 2022 12:12:45 +0000 (08:12 -0400)] 
Cleanup for libtool fixes (Issue #394)

3 years agoMerge pull request #394 from orbea/libtool
Michael R Sweet [Mon, 25 Jul 2022 12:08:49 +0000 (08:08 -0400)] 
Merge pull request #394 from orbea/libtool

config-scripts: Fix --enable-libtool-unsupported

3 years agoUpdate CHANGES.md
Zdenek Dohnal [Mon, 25 Jul 2022 11:35:11 +0000 (13:35 +0200)] 
Update CHANGES.md

3 years agoMerge pull request #436 from zdohnal/web_file_limit
zdohnal [Mon, 25 Jul 2022 11:32:14 +0000 (13:32 +0200)] 
Merge pull request #436 from zdohnal/web_file_limit

CUPS Web UI: Raise the file limit (fixes #433)

3 years agoCUPS Web UI: Raise the file limit (fixes #433) 436/head
Zdenek Dohnal [Mon, 25 Jul 2022 08:07:01 +0000 (10:07 +0200)] 
CUPS Web UI: Raise the file limit (fixes #433)

Some PPD files are larger than the current limit and they don't reside
in directories handled by `cups-driverd`, so users have to add them via
Web UI. The limit is now 2 MiB, the same as in PAPPL.

3 years agoAdd length checks to avoid pointer wraparound (Issue #431)
Michael R Sweet [Wed, 20 Jul 2022 02:00:12 +0000 (22:00 -0400)] 
Add length checks to avoid pointer wraparound (Issue #431)

3 years agoFix a potential SNMP OID value overflow issue (Issue #431)
Michael R Sweet [Mon, 18 Jul 2022 22:03:49 +0000 (18:03 -0400)] 
Fix a potential SNMP OID value overflow issue (Issue #431)

3 years agoFix link libraries on AIX (Issue #375)
Michael R Sweet [Sun, 17 Jul 2022 22:52:35 +0000 (18:52 -0400)] 
Fix link libraries on AIX (Issue #375)

3 years agoMerge pull request #430 from tysontan/tysontan-zh-translation
Michael R Sweet [Sun, 17 Jul 2022 21:11:54 +0000 (17:11 -0400)] 
Merge pull request #430 from tysontan/tysontan-zh-translation

Corrected Simplified Chinese translations of page sizes and others

3 years agoThird attempt to fix the broken string 430/head
Tyson Tan [Sat, 16 Jul 2022 14:43:41 +0000 (22:43 +0800)] 
Third attempt to fix the broken string

3 years agoSecond attempt to fix the broken string
Tyson Tan [Sat, 16 Jul 2022 14:41:27 +0000 (22:41 +0800)] 
Second attempt to fix the broken string

3 years agoCorrected a broken string.
Tyson Tan [Sat, 16 Jul 2022 14:36:29 +0000 (22:36 +0800)] 
Corrected a broken string.

3 years agoCorrected Simplified Chinese translations of page sizes and others
Tyson Tan [Sat, 16 Jul 2022 14:22:13 +0000 (22:22 +0800)] 
Corrected Simplified Chinese translations of page sizes and others

Corrected Simplified Chinese translations of page sizes and envelope sizes to match standards and reflect the original meanings. Corrected duplex translations. Replaced full-width brackets with half-width ones, which is the preferred practice of Chinese translation for FOSS projects.

3 years agoLocalize the HTTP response using the Content-Language value (Issue #426)
Michael R Sweet [Sun, 10 Jul 2022 15:53:41 +0000 (11:53 -0400)] 
Localize the HTTP response using the Content-Language value (Issue #426)

3 years agoIgnore LGTM alerts that aren't as smart as they think they are...
Michael R Sweet [Wed, 6 Jul 2022 15:22:31 +0000 (11:22 -0400)] 
Ignore LGTM alerts that aren't as smart as they think they are...

3 years agoMerge pull request #420 from zdohnal/invalid_pointer_uri
zdohnal [Thu, 23 Jun 2022 05:58:52 +0000 (07:58 +0200)] 
Merge pull request #420 from zdohnal/invalid_pointer_uri

scheduler/ipp.c: Allocate device_uri via cupsdSetString()

3 years agoscheduler/ipp.c: Allocate device_uri via cupsdSetString() 420/head
Zdenek Dohnal [Wed, 22 Jun 2022 07:23:45 +0000 (09:23 +0200)] 
scheduler/ipp.c: Allocate device_uri via cupsdSetString()

If a driverless printer has .local in its URI, we resolve the
URI and save the resolved one as new device URI. The problem was that
a local pointer was assigned to the structure which is passed to the
function as parameter, so the pointer became invalid once the execution
left the create_local_bg_thread() function.

We need to allocate the device URI via cupsdSetString() - the string is
then freed when the printer is deleted or cupsd shuts down.

Fixes #419.

3 years agoMerge pull request #417 from zdohnal/color_override
zdohnal [Tue, 21 Jun 2022 05:35:47 +0000 (07:35 +0200)] 
Merge pull request #417 from zdohnal/color_override

Don't override color settings from print dialog

3 years agoDon't override color settings from print dialog 417/head
Zdenek Dohnal [Mon, 20 Jun 2022 16:17:58 +0000 (18:17 +0200)] 
Don't override color settings from print dialog

When we put print-color-mode as a default attribute, it always overrides
settings from print dialog. We need to respect those settings and transform
the known PPD options into print-color-mode options.

3 years agoUpdate CHANGES.md
Zdenek Dohnal [Mon, 20 Jun 2022 10:27:50 +0000 (12:27 +0200)] 
Update CHANGES.md

3 years agoMerge pull request #353 from OpenPrinting/create-local-printer-localhost-fix
zdohnal [Mon, 20 Jun 2022 10:25:18 +0000 (12:25 +0200)] 
Merge pull request #353 from OpenPrinting/create-local-printer-localhost-fix

For local services use "localhost" in device URI of temporary queue

3 years agocreate_local_printer(): Improved comparison of device URI host name create-local-printer-localhost-fix 353/head
Till Kamppeter [Fri, 10 Jun 2022 19:19:29 +0000 (21:19 +0200)] 
create_local_printer(): Improved comparison of device URI host name

Improved the comparison of the device URI host name with the CUPS
server's host name to find out whether the temporary queue is for a
local IPP service.

- Compare case-insensitively as host names are case-insensitive

- If we have the DNS-SD host name (DNSSDHostName) of the CUPS server,
  consider names equal if they only differ by the presence or absense
  of a trailing dot ('.')

- If we only have the ServerName (for example with "Browsing = Off",
  not sharing printers), consider also a server name without ".local"
  equal to a device URI host name with ".local" as equal.

3 years agoFix crash when DNSSDHostName is NULL
Till Kamppeter [Wed, 16 Mar 2022 17:02:09 +0000 (18:02 +0100)] 
Fix crash when DNSSDHostName is NULL

If cupsd is running without Browsing (when not sharing printers) the
global variable DNSSDHostName of the scheduler is not set, staying
NULL. Therefore the previous commit causes a crash with this
configuration of CUPS.

This commit does a NULL check on DNSSDHostName and falls back to
ServerName if needed, where it also does a NULL check and if this is
also NULL, it refrains from any attempt to correct the device URI's
hostname to "localhost".

As ServerName usually contains the server's hostname without ".local"
suffix but the device URIs coming from Avahi usually have a suffixed
host name (and there are also the ".local" and ".local." variants of
the suffix), we consider hostnames also as equal if one has the
suffix, the other not, or if we have the variants with and without
trailing dot.

In addition, there are also HAVE_DNSSD conditionals added around the
code using DNSSDHostName now.

3 years agoFor local services use "localhost" in device URI of temporary queue
Till Kamppeter [Sun, 13 Mar 2022 20:31:58 +0000 (21:31 +0100)] 
For local services use "localhost" in device URI of temporary queue

To print to a temporary CUPS queue for a discovered IPP printer the
client has to send an IPP_OP_CUPS_CREATE_LOCAL_PRINTER IPP request to
the CUPS daemon with the details for creating the temporary queue.
CUPS then calls its create_local_printer() function to actually create
the queue. This is already automatically and correctly done if the
client uses the convenience API of libcups.

The GTK print dialog does not use the convenience API though. It
displays all IPP printers for which CUPS can create temporary queues
correctly, but it fails on services which are only available on the
local machine and not on the network (loopback interface, "localhost")
whereas printing via temporary queue on network/remote services works
perfectly.

The problem is that Avahi advertises the local services not with the
"localhost" host name but with the network host name of the local
machine. The libcups convenience API functions can cope with this and
send correct device URIs with the "localhost" host name to CUPS and so
the temporary queue gets created correctly.

The GTK dialog wants fully asynchronous CUPS operation and throws the
libcups API completely overboard doing all by itself, and sending
incorrect device URIs with the network hostname for the local
services. CUPS creates the temporary queue with this URI then and
fails to do the get-printer-attributes request on the printer to
generate the PPD file, leaving the temporary queue in a non-functional
state.

This commit correct/works around this by checking whether the device
URI's host name is the same as the DNS-SD host name of the local
machine and if so, replaces the device URI's host name by "localhost".

Now one can select local services like IPP-over-USB printers or
Printer Applications in the GTK print dialog and printing on them
through an auto-generated temporary CUPS queue works.

I decided to fix/work around this problem in CUPS as we see that no
every print client developer uses the libcups convenience API.

3 years agoFix OpenSSL crash bug - "tls" pointer wasn't cleared after freeing it (Issue #409)
Michael R Sweet [Tue, 7 Jun 2022 17:45:29 +0000 (13:45 -0400)] 
Fix OpenSSL crash bug - "tls" pointer wasn't cleared after freeing it (Issue #409)

3 years agoUpdate CHANGES.md
Zdenek Dohnal [Wed, 1 Jun 2022 05:15:53 +0000 (07:15 +0200)] 
Update CHANGES.md

3 years agoMerge branch 'Pro-pra-master'
Zdenek Dohnal [Wed, 1 Jun 2022 05:13:11 +0000 (07:13 +0200)] 
Merge branch 'Pro-pra-master'

3 years agochoose-device.tmpl: Add device uri into title of found network printer
Zdenek Dohnal [Wed, 1 Jun 2022 04:48:31 +0000 (06:48 +0200)] 
choose-device.tmpl: Add device uri into title of found network printer

There can be many printers on the same network with the same printer
model, which causes confusion for users about which one to add. This PR
adds a title for every found network printer, which contains the
printer's device uri. The title is shown when user hover the mouse over
the found entry.

Partially fixes #393, thanks to Pro-pra for the PR!

3 years agoUpdate CHANGES.md
Zdenek Dohnal [Wed, 1 Jun 2022 04:47:02 +0000 (06:47 +0200)] 
Update CHANGES.md

3 years agoMerge pull request #407 from zdohnal/config_update
zdohnal [Wed, 1 Jun 2022 04:38:35 +0000 (06:38 +0200)] 
Merge pull request #407 from zdohnal/config_update

Update config.{sub,guess}

3 years agoUpdate config.{sub,guess} 407/head
Zdenek Dohnal [Mon, 30 May 2022 14:37:17 +0000 (16:37 +0200)] 
Update config.{sub,guess}

3 years agoscheduler/cert.c: fix the comment
Zdenek Dohnal [Thu, 26 May 2022 07:28:20 +0000 (09:28 +0200)] 
scheduler/cert.c: fix the comment

3 years agoRelease 2.4.2 v2.4.2
Zdenek Dohnal [Thu, 26 May 2022 06:17:21 +0000 (08:17 +0200)] 
Release 2.4.2

3 years agoscheduler/cert.c: Fix string comparison (fixes CVE-2022-26691)
Zdenek Dohnal [Thu, 26 May 2022 04:27:04 +0000 (06:27 +0200)] 
scheduler/cert.c: Fix string comparison (fixes CVE-2022-26691)

The previous algorithm didn't expect the strings can have a different
length, so one string can be a substring of the other and such substring
was reported as equal to the longer string.

3 years agoconfig-scripts: Fix --enable-libtool-unsupported 394/head
orbea [Wed, 11 May 2022 18:57:32 +0000 (11:57 -0700)] 
config-scripts: Fix --enable-libtool-unsupported

When the LIBTOOL variable is set in the user's environment the build
will use libtool even when --enable-libtool-unsupported is not used.

This can lead to unexpected failures when LIBTOOL is set to rlibtool
rather than GNU libtool.

To solve this the build now relies on the enable_libtool_unsupported
varaiable set by --enable-libtool-unsupported.

Gentoo bug: https://bugs.gentoo.org/show_bug.cgi?id=843638

3 years agoFix typo in cups-sharedlibs.m4.
Michael R Sweet [Thu, 5 May 2022 12:02:41 +0000 (08:02 -0400)] 
Fix typo in cups-sharedlibs.m4.

3 years agoFix endif comment
Michael R Sweet [Thu, 5 May 2022 11:42:55 +0000 (07:42 -0400)] 
Fix endif comment

3 years agoMerge pull request #386 from aixtools/cups_snmp
Michael R Sweet [Thu, 5 May 2022 11:42:22 +0000 (07:42 -0400)] 
Merge pull request #386 from aixtools/cups_snmp

Include <cups/getifaddres-internal.h> when getifaddrs() is not provided by OS

3 years agoIt is just <fcntl.h>, don't use legacy (non-POSIX) path that is still supported
Michael R Sweet [Thu, 5 May 2022 11:39:35 +0000 (07:39 -0400)] 
It is just <fcntl.h>, don't use legacy (non-POSIX) path that is still supported
by most Unix platforms, but not all.

(this also makes the code consistent with usage everywhere else in the CUPS
code base)

Fixes: 388
3 years agoMerge pull request #390 from aixtools/cups_sharedlibs
Michael R Sweet [Thu, 5 May 2022 11:28:32 +0000 (07:28 -0400)] 
Merge pull request #390 from aixtools/cups_sharedlibs

AIX: Add DSOFLAGS and LDFLAGS for shared library support.

3 years agoAIX: correct DSOFLAGS and LDFLAGS for shared library support. 390/head
M Felt aka aixtools [Thu, 5 May 2022 07:19:24 +0000 (07:19 +0000)] 
AIX: correct DSOFLAGS and LDFLAGS for shared library support.

3 years agoWhen getifaddrs is not provided by OS 386/head
M Felt aka aixtools [Wed, 4 May 2022 14:57:46 +0000 (14:57 +0000)] 
When getifaddrs is not provided by OS
ensure # include <cups/getifaddrs-internal.h> occurs.

3 years agoLook for OpenSSL the old way if pkg-config is not available (Issue #375)
Michael R Sweet [Wed, 4 May 2022 12:28:00 +0000 (08:28 -0400)] 
Look for OpenSSL the old way if pkg-config is not available (Issue #375)

3 years agoNo longer use O_RDWR for append mode (Issue #291)
Michael R Sweet [Wed, 4 May 2022 12:10:46 +0000 (08:10 -0400)] 
No longer use O_RDWR for append mode (Issue #291)

3 years agoFix the prototype for the httpWriteResponse function (Issue #380)
Michael R Sweet [Tue, 3 May 2022 19:59:20 +0000 (15:59 -0400)] 
Fix the prototype for the httpWriteResponse function (Issue #380)

3 years agoReport when scheduler is not running (Issue #352)
Michael R Sweet [Mon, 2 May 2022 20:11:07 +0000 (16:11 -0400)] 
Report when scheduler is not running (Issue #352)

3 years agoUpdate man pages for -h option (Issue #357)
Michael R Sweet [Mon, 2 May 2022 19:35:20 +0000 (15:35 -0400)] 
Update man pages for -h option (Issue #357)

3 years agoFix lpoptions regression (Issue #370)
Michael R Sweet [Mon, 2 May 2022 18:57:42 +0000 (14:57 -0400)] 
Fix lpoptions regression (Issue #370)

3 years agoInvalidate PPD cache if cupsd.conf is newer (Issue #371)
Michael R Sweet [Mon, 2 May 2022 16:12:47 +0000 (12:12 -0400)] 
Invalidate PPD cache if cupsd.conf is newer (Issue #371)

3 years agoSet default auth-info-required='username,password' if a backend doesn't set an
Michael R Sweet [Mon, 2 May 2022 15:46:28 +0000 (11:46 -0400)] 
Set default auth-info-required='username,password' if a backend doesn't set an
authentication method (Issue #373)

3 years agoDo some web interface cleanup and restore the generic printer icon file.
Michael R Sweet [Mon, 2 May 2022 12:18:06 +0000 (08:18 -0400)] 
Do some web interface cleanup and restore the generic printer icon file.

Fix a few old references to www.cups.org.

3 years agoUpdate cupsGetResponse to always set the last error when returning NULL.
Michael R Sweet [Fri, 29 Apr 2022 18:02:52 +0000 (14:02 -0400)] 
Update cupsGetResponse to always set the last error when returning NULL.

3 years agoAdd a signal handler to ippeveprinter.
Michael R Sweet [Wed, 13 Apr 2022 21:42:06 +0000 (17:42 -0400)] 
Add a signal handler to ippeveprinter.

3 years agoUpdate Solaris smf file (Issue #368)
Michael R Sweet [Thu, 7 Apr 2022 16:10:29 +0000 (12:10 -0400)] 
Update Solaris smf file (Issue #368)

3 years agoUpdate CHANGES.md
Zdenek Dohnal [Thu, 7 Apr 2022 05:48:38 +0000 (07:48 +0200)] 
Update CHANGES.md

3 years agoMerge pull request #365 from zdohnal/gnutls_use_shut_wr
zdohnal [Thu, 7 Apr 2022 05:46:21 +0000 (07:46 +0200)] 
Merge pull request #365 from zdohnal/gnutls_use_shut_wr

cups/tls-gnutls.c: Use always GNUTLS_SHUT_WR

3 years agoUpdate CHANGES.md
Zdenek Dohnal [Thu, 7 Apr 2022 05:45:39 +0000 (07:45 +0200)] 
Update CHANGES.md

3 years agoMerge pull request #364 from zdohnal/temp_queues_cleanup
zdohnal [Thu, 7 Apr 2022 05:43:36 +0000 (07:43 +0200)] 
Merge pull request #364 from zdohnal/temp_queues_cleanup

scheduler/printers.c: Don't remove processing temp queue

3 years agoFix OpenSSL API usage bug.
Michael R Sweet [Wed, 6 Apr 2022 22:25:04 +0000 (18:25 -0400)] 
Fix OpenSSL API usage bug.

3 years agocups/tls-gnutls.c: Use always GNUTLS_SHUT_WR 365/head
Zdenek Dohnal [Wed, 6 Apr 2022 13:04:45 +0000 (15:04 +0200)] 
cups/tls-gnutls.c: Use always GNUTLS_SHUT_WR

The current mode for `gnutls_bye()` in client use cases strictly
follows TLS v1.2 standard, which in this particular part says:

```
Unless some other fatal alert has been transmitted, each party is
required to send a close_notify alert before closing the write
side of the connection.  The other party MUST respond with a
close_notify alert of its own and close down the connection immediately,
discarding any pending writes.  It is not required for the initiator
of the close to wait for the responding close_notify alert before
closing the read side of the connection.
```

and waits for the other side of TLS connection to confirm the close.

Unfortunately it can undesired for reasons:
- we support switching of TLS versions in CUPS, and this mode strictly
  follows TLS v1.2 - so for older version this behavior is not expected
  and can cause delays
- even some TLS v1.2 implementations (like Windows Server 2016) don't
  comply TLS v1.2 behavior even if it says it does - in that case,
  encrypted printing takes 30s till HTTP timeout is reached, because the
  other side didn't send confirmation
- AFAIU openssl's SSL_shutdown() doesn't make this TLS v1.2 difference,
  so we could end up with two TLS implementations in CUPS which will
  behave differently

Since the standard defines that waiting for confirmation is not required
and due the problems above, I would propose using GNUTLS_SHUT_WR mode
regardless of HTTP mode.

3 years agoscheduler/printers.c: Don't remove processing temp queue 364/head
Zdenek Dohnal [Wed, 6 Apr 2022 09:18:11 +0000 (11:18 +0200)] 
scheduler/printers.c: Don't remove processing temp queue

cupsdDeleteTemporaryPrinters() deletes temporary queues which their last
status was updated 1 minute ago or older. It doesn't take into account
the fact the printer can be processing a big print job and cupsd deletes
the temp queue either way.

The fix in the PR now set cupsd to ignore queues which are in processing
state. If the delay in job processing is caused by an error in printer,
the correct error should kick in IPP backend.

3 years agoFix OpenSSL DLL paths.
Michael R Sweet [Tue, 5 Apr 2022 15:12:03 +0000 (11:12 -0400)] 
Fix OpenSSL DLL paths.

3 years agoFix context leak found by Coverity in new OpenSSL code.
Michael R Sweet [Mon, 4 Apr 2022 02:46:19 +0000 (22:46 -0400)] 
Fix context leak found by Coverity in new OpenSSL code.

3 years agoUpdate configure script for new version.
Michael R Sweet [Thu, 31 Mar 2022 19:19:56 +0000 (15:19 -0400)] 
Update configure script for new version.

3 years agoDrop version number from INSTALL.md, don't check for it in makesrcdist.
Michael R Sweet [Thu, 31 Mar 2022 14:19:24 +0000 (10:19 -0400)] 
Drop version number from INSTALL.md, don't check for it in makesrcdist.

3 years agoChangelog, bump version to 2.4.2.
Michael R Sweet [Thu, 31 Mar 2022 14:17:52 +0000 (10:17 -0400)] 
Changelog, bump version to 2.4.2.

3 years agoMerge pull request #362 from OpenPrinting/openssl
Michael R Sweet [Thu, 31 Mar 2022 14:16:30 +0000 (10:16 -0400)] 
Merge pull request #362 from OpenPrinting/openssl

Bring back OpenSSL/LibreSSL support

3 years agoWindows build fixes. 362/head
Michael R Sweet [Thu, 31 Mar 2022 13:23:41 +0000 (09:23 -0400)] 
Windows build fixes.

3 years agoForce i386 Linux builds to use GNU TLS for build tests while x86_64 Linux builds...
Michael R Sweet [Thu, 31 Mar 2022 11:41:56 +0000 (07:41 -0400)] 
Force i386 Linux builds to use GNU TLS for build tests while x86_64 Linux builds use OpenSSL.

3 years agoFix remaining OpenSSL BIO issues.
Michael R Sweet [Thu, 31 Mar 2022 11:31:11 +0000 (07:31 -0400)] 
Fix remaining OpenSSL BIO issues.

3 years agoUse more modern BIO_METHOD APIs to work on current OpenSSL.
Michael R Sweet [Thu, 31 Mar 2022 01:09:27 +0000 (21:09 -0400)] 
Use more modern BIO_METHOD APIs to work on current OpenSSL.

3 years agoUse BIO methods to write cert files.
Michael R Sweet [Wed, 30 Mar 2022 22:13:18 +0000 (18:13 -0400)] 
Use BIO methods to write cert files.

3 years agoImplement subject alternate name support for cupsMakeServerCredentials.
Michael R Sweet [Wed, 30 Mar 2022 22:09:02 +0000 (18:09 -0400)] 
Implement subject alternate name support for cupsMakeServerCredentials.

3 years agoImplement cupsMakeServerCredentials.
Michael R Sweet [Wed, 30 Mar 2022 21:38:52 +0000 (17:38 -0400)] 
Implement cupsMakeServerCredentials.

3 years agoFinish up all of the client-side certificate stuff.
Michael R Sweet [Wed, 30 Mar 2022 21:05:40 +0000 (17:05 -0400)] 
Finish up all of the client-side certificate stuff.

3 years agoFix bug in tlscheck utility - wasn't retrying connections and used "host"
Michael R Sweet [Wed, 30 Mar 2022 18:31:22 +0000 (14:31 -0400)] 
Fix bug in tlscheck utility - wasn't retrying connections and used "host"
instead of "server" when constructing the printer URI.

Continue OpenSSL implementations of http_create_credentials,
httpCopyCredentials, and httpCredentialString.