-CHANGES.txt - 01/18/2000
+CHANGES.txt - 01/23/2001
------------------------
CHANGES IN CUPS V1.1.6
BrowseInterval was set to 0.
- The lpadmin command now supports setting of options
and user-level access control.
+ - Added "-E" option to all printing commands to force
+ encryption.
CHANGES IN CUPS V1.1.5-2
-ENCRYPTION - CUPS v1.1.5 - 12/20/2000
+ENCRYPTION - CUPS v1.1.6 - 01/23/2001
-------------------------------------
This file describes the encryption support provided by CUPS.
The current implementation is very basic. The CUPS client
software (lp, lpr, etc.) uses encryption as requested by the
-server and/or as specified by the Encryption directive in the
-client.conf file or in the CUPS_ENCRYPTION environment
-variable:
+user or server.
+
+The user can specify the "-E" option with the printing commands
+to force encryption of the connection. Encryption can also be
+specified using the Encryption directive in the client.conf file
+or in the CUPS_ENCRYPTION environment variable:
Never
connection is made. This is different than the "Always"
mode above since the connection is initially unsecure
and the client initiates the upgrade to TLS encryption.
+ (same as using the "-E" option)
These keywords are also used in the cupsd.conf file to secure
particular locations. To secure all traffic on the server, listen
-INSTALL - CUPS v1.1.5 - 12/20/2000
+INSTALL - CUPS v1.1.6 - 01/23/2001
----------------------------------
This file describes how to compile and install CUPS from source
http://www.openssl.org
+See the file "ENCRYPTION.txt" for information on using the
+encryption support in CUPS.
+
Once you have configured things, just type:
make ENTER
-README - CUPS v1.1.5 - 12/20/2000
+README - CUPS v1.1.6 - 01/23/2001
---------------------------------
Looking for compile instructions? Read the file "INSTALL.txt"
/*
- * "$Id: lpq.c,v 1.15 2001/01/22 15:03:21 mike Exp $"
+ * "$Id: lpq.c,v 1.16 2001/01/23 17:36:20 mike Exp $"
*
* "lpq" command for the Common UNIX Printing System (CUPS).
*
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
+#include <config.h>
#include <cups/cups.h>
#include <cups/language.h>
#include <cups/debug.h>
longstatus; /* Show file details */
int num_dests; /* Number of destinations */
cups_dest_t *dests; /* Destinations */
+ http_encryption_t encryption; /* Encryption? */
/*
* Connect to the scheduler...
*/
- http = httpConnect(cupsServer(), ippPort());
+ if ((http = httpConnect(cupsServer(), ippPort())) == NULL)
+ {
+ fputs("lpq: Unable to contact server!\n", stderr);
+ return (1);
+ }
/*
* Check for command-line options...
{
switch (argv[i][1])
{
+ case 'E' : /* Encrypt */
+#ifdef HAVE_LIBSSL
+ encryption = HTTP_ENCRYPT_REQUIRED;
+
+ if (http)
+ httpEncryption(http, encryption);
+#else
+ fprintf(stderr, "%s: Sorry, no encryption support compiled in!\n",
+ argv[0]);
+#endif /* HAVE_LIBSSL */
+ break;
+
case 'P' : /* Printer */
if (argv[i][2])
dest = argv[i] + 2;
/*
- * End of "$Id: lpq.c,v 1.15 2001/01/22 15:03:21 mike Exp $".
+ * End of "$Id: lpq.c,v 1.16 2001/01/23 17:36:20 mike Exp $".
*/
/*
- * "$Id: lpr.c,v 1.16 2001/01/22 15:03:21 mike Exp $"
+ * "$Id: lpr.c,v 1.17 2001/01/23 17:36:20 mike Exp $"
*
* "lpr" command for the Common UNIX Printing System (CUPS).
*
#include <stdio.h>
#include <stdlib.h>
+
+#include <config.h>
#include <cups/cups.h>
if (argv[i][0] == '-')
switch (argv[i][1])
{
+ case 'E' : /* Encrypt */
+#ifdef HAVE_LIBSSL
+ cupsSetEncryption(HTTP_ENCRYPT_REQUIRED);
+#else
+ fprintf(stderr, "%s: Sorry, no encryption support compiled in!\n",
+ argv[0]);
+#endif /* HAVE_LIBSSL */
+ break;
+
case 'i' : /* indent */
case 'w' : /* width */
if (argv[i][2] == '\0')
/*
- * End of "$Id: lpr.c,v 1.16 2001/01/22 15:03:21 mike Exp $".
+ * End of "$Id: lpr.c,v 1.17 2001/01/23 17:36:20 mike Exp $".
*/
/*
- * "$Id: lprm.c,v 1.13 2001/01/22 15:03:21 mike Exp $"
+ * "$Id: lprm.c,v 1.14 2001/01/23 17:36:20 mike Exp $"
*
* "lprm" command for the Common UNIX Printing System (CUPS).
*
cups_lang_t *language; /* Language */
int num_dests; /* Number of destinations */
cups_dest_t *dests; /* Destinations */
+ http_encryption_t encryption; /* Encryption? */
/*
* Setup to cancel individual print jobs...
*/
- op = IPP_CANCEL_JOB;
- job_id = 0;
- dest = NULL;
- response = NULL;
- http = NULL;
+ op = IPP_CANCEL_JOB;
+ job_id = 0;
+ dest = NULL;
+ response = NULL;
+ http = NULL;
+ encryption = cupsEncryption();
num_dests = cupsGetDests(&dests);
return (1);
}
+ httpEncryption(http, encryption);
+
/*
* Process command-line arguments...
*/
if (argv[i][0] == '-' && argv[i][1] != '\0')
switch (argv[i][1])
{
+ case 'E' : /* Encrypt */
+#ifdef HAVE_LIBSSL
+ encryption = HTTP_ENCRYPT_REQUIRED;
+
+ httpEncryption(http, encryption);
+#else
+ fprintf(stderr, "%s: Sorry, no encryption support compiled in!\n",
+ argv[0]);
+#endif /* HAVE_LIBSSL */
+ break;
+
case 'P' : /* Cancel jobs on a printer */
if (argv[i][2])
dest = argv[i] + 2;
/*
- * End of "$Id: lprm.c,v 1.13 2001/01/22 15:03:21 mike Exp $".
+ * End of "$Id: lprm.c,v 1.14 2001/01/23 17:36:20 mike Exp $".
*/
.\"
-.\" "$Id: accept.man,v 1.3 2001/01/23 16:26:19 mike Exp $"
+.\" "$Id: accept.man,v 1.4 2001/01/23 17:36:21 mike Exp $"
.\"
.\" accept/reject man page for the Common UNIX Printing System (CUPS).
.\"
.\" EMail: cups-info@cups.org
.\" WWW: http://www.cups.org
.\"
-.TH accept 8 "Common UNIX Printing System" "22 September 1999" "Easy Software Products"
+.TH accept 8 "Common UNIX Printing System" "23 January 2001" "Easy Software Products"
.SH NAME
accept/reject \- accept/reject jobs sent to a destination
.SH SYNOPSIS
destination(s)
.br
.B reject
-[ -h
+[ -E ] [ -h
.I server
] [ -r [
.I reason
\fIreject\fR instructs the printing system to reject print jobs to the
specified destinations. The \fI-r\fR option sets the reason for rejecting
print jobs. If not specified the reason defaults to "Reason Unknown".
+.LP
+The \fI-E\fR option forces encryption when connecting to the server.
.SH COMPATIBILITY
The CUPS versions of \fIaccept\fR and \fIreject\fR may ask the user for an
access password depending on the printing system configuration. This differs
.SH COPYRIGHT
Copyright 1993-2001 by Easy Software Products, All Rights Reserved.
.\"
-.\" End of "$Id: accept.man,v 1.3 2001/01/23 16:26:19 mike Exp $".
+.\" End of "$Id: accept.man,v 1.4 2001/01/23 17:36:21 mike Exp $".
.\"
.\"
-.\" "$Id: enable.man,v 1.3 2001/01/23 16:26:20 mike Exp $"
+.\" "$Id: enable.man,v 1.4 2001/01/23 17:36:21 mike Exp $"
.\"
.\" enable/disable man page for the Common UNIX Printing System (CUPS).
.\"
.\" EMail: cups-info@cups.org
.\" WWW: http://www.cups.org
.\"
-.TH enable 8 "Common UNIX Printing System" "22 September 1999" "Easy Software Products"
+.TH enable 8 "Common UNIX Printing System" "23 January 2001" "Easy Software Products"
.SH NAME
disable, enable \- stop/start printers and classes
.SH SYNOPSIS
.B disable
-[ \-c ] [ -h
+[ -E ] [ \-c ] [ -h
.I server
] [ \-r [
.I reason
] ] destination(s)
.br
.B enable
-destination(s)
+[ -E ] destination(s)
.SH DESCRIPTION
\fIenable\fR starts the named printers or classes.
.LP
.br
Sets the message associated with the stopped state. If no reason is specified
then the message is set to "Reason Unknown".
+.LP
+The \fI-E\fR option forces encryption when connecting to the server.
.SH COMPATIBILITY
The CUPS versions of \fIdisable\fR and \fIenable\fR may ask the user for an
access password depending on the printing system configuration. This differs
Copyright 1993-2001 by Easy Software Products, All Rights Reserved.
.\"
-.\" End of "$Id: enable.man,v 1.3 2001/01/23 16:26:20 mike Exp $".
+.\" End of "$Id: enable.man,v 1.4 2001/01/23 17:36:21 mike Exp $".
.\"
.\"
-.\" "$Id: lp.man,v 1.4 2001/01/23 16:26:20 mike Exp $"
+.\" "$Id: lp.man,v 1.5 2001/01/23 17:36:21 mike Exp $"
.\"
.\" lp/cancel man page for the Common UNIX Printing System (CUPS).
.\"
.\" EMail: cups-info@cups.org
.\" WWW: http://www.cups.org
.\"
-.TH lp 1 "Common UNIX Printing System" "11 November 2000" "Easy Software Products"
+.TH lp 1 "Common UNIX Printing System" "23 January 2001" "Easy Software Products"
.SH NAME
lp \- print files
.br
cancel \- cancel jobs
.SH SYNOPSIS
.B lp
-[ \-c ] [ \-d
+[ -E ] [ \-c ] [ \-d
.I destination
] [ \-h
.I server
.SH OPTIONS
The following options are recognized by \fBlp\fR:
.TP 5
+\-E
+.br
+Forces encryption when connecting to the server.
+.TP 5
\-d \fIdestination\fR
.br
Prints files to the named printer.
.SH COPYRIGHT
Copyright 1993-2001 by Easy Software Products, All Rights Reserved.
.\"
-.\" End of "$Id: lp.man,v 1.4 2001/01/23 16:26:20 mike Exp $".
+.\" End of "$Id: lp.man,v 1.5 2001/01/23 17:36:21 mike Exp $".
.\"
.\"
-.\" "$Id: lpadmin.man,v 1.3 2001/01/23 16:26:20 mike Exp $"
+.\" "$Id: lpadmin.man,v 1.4 2001/01/23 17:36:21 mike Exp $"
.\"
.\" lpadmin man page for the Common UNIX Printing System (CUPS).
.\"
lpadmin \- configure cups printers and classes
.SH SYNOPSIS
.B lpadmin
-[ -h
+[ -E ] [ -h
.I server
] \-d
.I destination
.br
.B lpadmin
-[ -h
+[ -E ] [ -h
.I server
] \-p
.I printer
.I option(s)
.br
.B lpadmin
-[ -h
+[ -E ] [ -h
.I server
] \-x
.I destination
\fIlpadmin\fR configures printer and class queues provided by CUPS. It can also
be used to set the system default printer or class.
.LP
+The \fI-E\fR option forces encryption when connecting to the server.
+.LP
The first form of the command sets the default printer or class to
\fIdestination\fR. Subsequent print jobs submitted via the \fIlp(1)\fR or
\fIlpr(1)\fR commands will use this destination unless the user specifies
.SH COPYRIGHT
Copyright 1993-2001 by Easy Software Products, All Rights Reserved.
.\"
-.\" End of "$Id: lpadmin.man,v 1.3 2001/01/23 16:26:20 mike Exp $".
+.\" End of "$Id: lpadmin.man,v 1.4 2001/01/23 17:36:21 mike Exp $".
.\"
.\"
-.\" "$Id: lpinfo.man,v 1.4 2001/01/23 16:26:20 mike Exp $"
+.\" "$Id: lpinfo.man,v 1.5 2001/01/23 17:36:21 mike Exp $"
.\"
.\" lpinfo man page for the Common UNIX Printing System (CUPS).
.\"
.\" EMail: cups-info@cups.org
.\" WWW: http://www.cups.org
.\"
-.TH lpinfo 8 "Common UNIX Printing System" "10 May 2000" "Easy Software Products"
+.TH lpinfo 8 "Common UNIX Printing System" "23 January 2001" "Easy Software Products"
.SH NAME
lpinfo \- show available devices or drivers
.SH SYNOPSIS
.B lpinfo
-[ -l ] [ -m ] [ -v ]
+[ -E ] [ -l ] [ -m ] [ -v ]
.SH DESCRIPTION
\fBlpinfo\fR lists the available devices or drivers known to the CUPS
server. One of the \fI-m\fR or \fI-v\fR options must be specified to
get any output:
.TP 5
+\-E
+.br
+Forces encryption when connecting to the server.
+.TP 5
\-l
.br
Shows a "long" listing of devices or drivers.
.SH COPYRIGHT
Copyright 1993-2001 by Easy Software Products, All Rights Reserved.
.\"
-.\" End of "$Id: lpinfo.man,v 1.4 2001/01/23 16:26:20 mike Exp $".
+.\" End of "$Id: lpinfo.man,v 1.5 2001/01/23 17:36:21 mike Exp $".
.\"
.\"
-.\" "$Id: lpmove.man,v 1.4 2001/01/23 16:26:21 mike Exp $"
+.\" "$Id: lpmove.man,v 1.5 2001/01/23 17:36:21 mike Exp $"
.\"
.\" lpmove man page for the Common UNIX Printing System (CUPS).
.\"
.\" EMail: cups-info@cups.org
.\" WWW: http://www.cups.org
.\"
-.TH lpmove 8 "Common UNIX Printing System" "10 May 2000" "Easy Software Products"
+.TH lpmove 8 "Common UNIX Printing System" "23 January 2001" "Easy Software Products"
.SH NAME
lpmove \- move a job to a new destination
.SH SYNOPSIS
.B lpmove
+[ -E ]
.I job destination
.SH DESCRIPTION
\fBlpmove\fR moves the specified \fIjob\fR to \fIdestination\fR. \fIjob\fR
lpmove 123 newprinter
lpmove oldprinter-123 newprinter
.fi
+.LP
+The \fI-E\fR option forces encryption when connecting to the server.
.SH COMPATIBILITY
The System V version of this command also allows moving of all jobs from one
queue to another. This functionality is currently not supported by CUPS.
.SH COPYRIGHT
Copyright 1993-2001 by Easy Software Products, All Rights Reserved.
.\"
-.\" End of "$Id: lpmove.man,v 1.4 2001/01/23 16:26:21 mike Exp $".
+.\" End of "$Id: lpmove.man,v 1.5 2001/01/23 17:36:21 mike Exp $".
.\"
.\"
-.\" "$Id: lpq.man,v 1.3 2001/01/23 16:26:21 mike Exp $"
+.\" "$Id: lpq.man,v 1.4 2001/01/23 17:36:21 mike Exp $"
.\"
.\" lpq man page for the Common UNIX Printing System (CUPS).
.\"
.\" EMail: cups-info@cups.org
.\" WWW: http://www.cups.org
.\"
-.TH lpq 1 "Common UNIX Printing System" "7 December 1999" "Easy Software Products"
+.TH lpq 1 "Common UNIX Printing System" "23 January 2001" "Easy Software Products"
.SH NAME
lpq \- show printer queue status
.SH SYNOPSIS
.B lpq
-[ \-P
+[ -E ] [ \-P
.I dest
] [ \-l ] [
.I +interval
in the queue until the queue is empty; the list of jobs is show one
every \fIinterval\fR seconds.
.LP
+The \fI-E\fR option forces encryption when connecting to the server.
+.LP
The \fI-l\fR option requests a more verbose reporting format.
.SH SEE ALSO
cancel(1), lp(1), lpr(1), lprm(1), lpstat(1)
.SH COPYRIGHT
Copyright 1993-2001 by Easy Software Products, All Rights Reserved.
.\"
-.\" End of "$Id: lpq.man,v 1.3 2001/01/23 16:26:21 mike Exp $".
+.\" End of "$Id: lpq.man,v 1.4 2001/01/23 17:36:21 mike Exp $".
.\"
.\"
-.\" "$Id: lpr.man,v 1.3 2001/01/23 16:26:21 mike Exp $"
+.\" "$Id: lpr.man,v 1.4 2001/01/23 17:36:21 mike Exp $"
.\"
.\" lpr man page for the Common UNIX Printing System (CUPS).
.\"
.\" EMail: cups-info@cups.org
.\" WWW: http://www.cups.org
.\"
-.TH lpr 1 "Common UNIX Printing System" "9 September 1999" "Easy Software Products"
+.TH lpr 1 "Common UNIX Printing System" "23 January 2001" "Easy Software Products"
.SH NAME
lpr \- print files
.SH SYNOPSIS
.B lpr
-[ \-P
+[ -E ] [ \-P
.I destination
] [ \-#
.I num-copies
.SH OPTIONS
The following options are recognized by \fBlpr\fR:
.TP 5
+\-E
+.br
+Forces encryption when connecting to the server.
+.TP 5
\-P \fIdestination\fR
.br
Prints files to the named printer.
.SH COPYRIGHT
Copyright 1993-2001 by Easy Software Products, All Rights Reserved.
.\"
-.\" End of "$Id: lpr.man,v 1.3 2001/01/23 16:26:21 mike Exp $".
+.\" End of "$Id: lpr.man,v 1.4 2001/01/23 17:36:21 mike Exp $".
.\"
.\"
-.\" "$Id: lprm.man,v 1.3 2001/01/23 16:26:21 mike Exp $"
+.\" "$Id: lprm.man,v 1.4 2001/01/23 17:36:22 mike Exp $"
.\"
.\" lprm man page for the Common UNIX Printing System (CUPS).
.\"
.\" EMail: cups-info@cups.org
.\" WWW: http://www.cups.org
.\"
-.TH lprm 1 "Common UNIX Printing System" "22 September 1999" "Easy Software Products"
+.TH lprm 1 "Common UNIX Printing System" "23 January 2001" "Easy Software Products"
.SH NAME
lprm \- cancel print jobs
.SH SYNOPSIS
.B lprm
-[ - ] [ -P
+[ -E ] [ - ] [ -P
.I destination
] [
.I job ID(s)
If no arguments are supplied, the current job on the default destination is
cancelled. You can specify one or more job ID numbers to cancel those jobs,
or use the \fI\-\fR option to cancel all jobs.
+.LP
+The \fI-E\fR option forces encryption when connecting to the server.
.SH COMPATIBILITY
The CUPS version of \fIlprm\fR is compatible with the standard Berkeley
\fIlprm\fR command.
.SH COPYRIGHT
Copyright 1993-2001 by Easy Software Products, All Rights Reserved.
.\"
-.\" End of "$Id: lprm.man,v 1.3 2001/01/23 16:26:21 mike Exp $".
+.\" End of "$Id: lprm.man,v 1.4 2001/01/23 17:36:22 mike Exp $".
.\"
.\"
-.\" "$Id: lpstat.man,v 1.4 2001/01/23 16:26:21 mike Exp $"
+.\" "$Id: lpstat.man,v 1.5 2001/01/23 17:36:22 mike Exp $"
.\"
.\" lpstat man page for the Common UNIX Printing System (CUPS).
.\"
.\" EMail: cups-info@cups.org
.\" WWW: http://www.cups.org
.\"
-.TH lpstat 1 "Common UNIX Printing System" "1 May 2000" "Easy Software Products"
+.TH lpstat 1 "Common UNIX Printing System" "23 January 2001" "Easy Software Products"
.SH NAME
lpstat \- print cups status information
.SH SYNOPSIS
.B lpstat
-[ -a [
+[ -E ] [ -a [
.I destination(s)
] ] [ -c [
.I class(es)
printers. When run with no arguments, \fBlpstat\fR will list jobs queued by
the user. Other options include:
.TP 5
+\-E
+.br
+Forces encryption when connecting to the server.
+.TP 5
\-a [\fIprinter(s)\fR]
.br
Shows the accepting state of printer queues. If no printers are
.SH COPYRIGHT
Copyright 1993-2001 by Easy Software Products, All Rights Reserved.
.\"
-.\" End of "$Id: lpstat.man,v 1.4 2001/01/23 16:26:21 mike Exp $".
+.\" End of "$Id: lpstat.man,v 1.5 2001/01/23 17:36:22 mike Exp $".
.\"
/*
- * "$Id: accept.c,v 1.10 2001/01/22 15:04:02 mike Exp $"
+ * "$Id: accept.c,v 1.11 2001/01/23 17:36:22 mike Exp $"
*
* "accept", "disable", "enable", and "reject" commands for the Common
* UNIX Printing System (CUPS).
#include <stdlib.h>
#include <ctype.h>
+#include <config.h>
#include <cups/cups.h>
#include <cups/language.h>
ipp_op_t op; /* Operation */
cups_lang_t *language; /* Language */
int cancel; /* Cancel jobs? */
+ http_encryption_t encryption; /* Encryption? */
/*
return (1);
}
- http = NULL;
- reason = NULL;
+ http = NULL;
+ reason = NULL;
+ encryption = cupsEncryption();
/*
* Process command-line arguments...
if (argv[i][0] == '-')
switch (argv[i][1])
{
+ case 'E' : /* Encrypt */
+#ifdef HAVE_LIBSSL
+ encryption = HTTP_ENCRYPT_REQUIRED;
+
+ if (http)
+ httpEncryption(http, encryption);
+#else
+ fprintf(stderr, "%s: Sorry, no encryption support compiled in!\n",
+ argv[0]);
+#endif /* HAVE_LIBSSL */
+ break;
+
case 'c' : /* Cancel jobs */
cancel = 1;
break;
* Do the request and get back a response...
*/
+ httpEncryption(http, encryption);
+
if ((response = cupsDoRequest(http, request, "/admin/")) != NULL)
{
if (response->request.status.status_code > IPP_OK_CONFLICT)
/*
- * End of "$Id: accept.c,v 1.10 2001/01/22 15:04:02 mike Exp $".
+ * End of "$Id: accept.c,v 1.11 2001/01/23 17:36:22 mike Exp $".
*/
/*
- * "$Id: cancel.c,v 1.17 2001/01/22 15:04:02 mike Exp $"
+ * "$Id: cancel.c,v 1.18 2001/01/23 17:36:22 mike Exp $"
*
* "cancel" command for the Common UNIX Printing System (CUPS).
*
#include <stdlib.h>
#include <ctype.h>
+#include <config.h>
#include <cups/cups.h>
#include <cups/language.h>
ipp_t *response; /* IPP response */
ipp_op_t op; /* Operation */
cups_lang_t *language; /* Language */
+ http_encryption_t encryption; /* Encryption? */
/*
* Setup to cancel individual print jobs...
*/
- op = IPP_CANCEL_JOB;
- job_id = 0;
- dest = NULL;
- http = NULL;
+ op = IPP_CANCEL_JOB;
+ job_id = 0;
+ dest = NULL;
+ http = NULL;
+ encryption = cupsEncryption();
/*
* Process command-line arguments...
if (argv[i][0] == '-')
switch (argv[i][1])
{
+ case 'E' : /* Encrypt */
+#ifdef HAVE_LIBSSL
+ encryption = HTTP_ENCRYPT_REQUIRED;
+
+ if (http)
+ httpEncryption(http, encryption);
+#else
+ fprintf(stderr, "%s: Sorry, no encryption support compiled in!\n",
+ argv[0]);
+#endif /* HAVE_LIBSSL */
+ break;
+
case 'a' : /* Cancel all jobs */
op = IPP_PURGE_JOBS;
break;
* Do the request and get back a response...
*/
+ httpEncryption(http, encryption);
+
if (op == IPP_PURGE_JOBS)
response = cupsDoRequest(http, request, "/admin/");
else
/*
- * End of "$Id: cancel.c,v 1.17 2001/01/22 15:04:02 mike Exp $".
+ * End of "$Id: cancel.c,v 1.18 2001/01/23 17:36:22 mike Exp $".
*/
/*
- * "$Id: lp.c,v 1.26 2001/01/22 15:04:02 mike Exp $"
+ * "$Id: lp.c,v 1.27 2001/01/23 17:36:23 mike Exp $"
*
* "lp" command for the Common UNIX Printing System (CUPS).
*
if (argv[i][0] == '-')
switch (argv[i][1])
{
+ case 'E' : /* Encrypt */
+#ifdef HAVE_LIBSSL
+ cupsSetEncryption(HTTP_ENCRYPT_REQUIRED);
+#else
+ fprintf(stderr, "%s: Sorry, no encryption support compiled in!\n",
+ argv[0]);
+#endif /* HAVE_LIBSSL */
+ break;
+
case 'c' : /* Copy to spool dir (always enabled) */
break;
/*
- * End of "$Id: lp.c,v 1.26 2001/01/22 15:04:02 mike Exp $".
+ * End of "$Id: lp.c,v 1.27 2001/01/23 17:36:23 mike Exp $".
*/
/*
- * "$Id: lpadmin.c,v 1.19 2001/01/23 16:26:22 mike Exp $"
+ * "$Id: lpadmin.c,v 1.20 2001/01/23 17:36:23 mike Exp $"
*
* "lpadmin" command for the Common UNIX Printing System (CUPS).
*
const char *datadir; /* CUPS_DATADIR env variable */
int num_options; /* Number of options */
cups_option_t *options; /* Options */
+ http_encryption_t encryption; /* Encryption? */
http = NULL;
printer = NULL;
num_options = 0;
options = NULL;
+ encryption = cupsEncryption();
if ((datadir = getenv("CUPS_DATADIR")) == NULL)
datadir = CUPS_DATADIR;
perror("lpadmin: Unable to connect to server");
return (1);
}
+
+ httpEncryption(http, encryption);
}
if (printer == NULL)
perror("lpadmin: Unable to connect to server");
return (1);
}
+
+ httpEncryption(http, encryption);
}
if (argv[i][2])
return (1);
}
else
+ {
+ httpEncryption(http, encryption);
cupsSetServer(http->hostname);
+ }
break;
case 'i' : /* Use the specified interface script */
perror("lpadmin: Unable to connect to server");
return (1);
}
+
+ httpEncryption(http, encryption);
}
if (printer == NULL)
break;
case 'E' : /* Enable the printer */
+ if (printer == NULL)
+ {
+#ifdef HAVE_LIBSSL
+ cupsSetEncryption(encryption = HTTP_ENCRYPT_REQUIRED);
+
+ if (http)
+ httpEncryption(http, encryption);
+#else
+ fprintf(stderr, "%s: Sorry, no encryption support compiled in!\n",
+ argv[0]);
+#endif /* HAVE_LIBSSL */
+ break;
+ }
+
if (!http)
{
http = httpConnect(cupsServer(), ippPort());
perror("lpadmin: Unable to connect to server");
return (1);
}
- }
- if (printer == NULL)
- {
- fputs("lpadmin: Unable to enable the printer:\n", stderr);
- fputs(" You must specify a printer name first!\n", stderr);
- return (1);
- }
+ httpEncryption(http, encryption);
+ }
enable_printer(http, printer);
break;
perror("lpadmin: Unable to connect to server");
return (1);
}
+
+ httpEncryption(http, encryption);
}
if (printer == NULL)
perror("lpadmin: Unable to connect to server");
return (1);
}
+
+ httpEncryption(http, encryption);
}
if (argv[i][2])
perror("lpadmin: Unable to connect to server");
return (1);
}
+
+ httpEncryption(http, encryption);
}
break;
perror("lpadmin: Unable to connect to server");
return (1);
}
+
+ httpEncryption(http, encryption);
}
if (printer == NULL)
perror("lpadmin: Unable to connect to server");
return (1);
}
+
+ httpEncryption(http, encryption);
}
if (printer == NULL)
perror("lpadmin: Unable to connect to server");
return (1);
}
+
+ httpEncryption(http, encryption);
}
if (argv[i][2])
perror("lpadmin: Unable to connect to server");
return (1);
}
+
+ httpEncryption(http, encryption);
}
if (printer == NULL)
perror("lpadmin: Unable to connect to server");
return (1);
}
+
+ httpEncryption(http, encryption);
}
if (printer == NULL)
perror("lpadmin: Unable to connect to server");
return (1);
}
+
+ httpEncryption(http, encryption);
}
if (printer == NULL)
perror("lpadmin: Unable to connect to server");
return (1);
}
+
+ httpEncryption(http, encryption);
}
if (printer == NULL)
/*
- * End of "$Id: lpadmin.c,v 1.19 2001/01/23 16:26:22 mike Exp $".
+ * End of "$Id: lpadmin.c,v 1.20 2001/01/23 17:36:23 mike Exp $".
*/
/*
- * "$Id: lpinfo.c,v 1.2 2001/01/22 15:04:02 mike Exp $"
+ * "$Id: lpinfo.c,v 1.3 2001/01/23 17:36:23 mike Exp $"
*
* "lpinfo" command for the Common UNIX Printing System (CUPS).
*
int i; /* Looping var */
http_t *http; /* Connection to server */
int long_status; /* Long listing? */
+ http_encryption_t encryption; /* Encryption? */
http = NULL;
long_status = 0;
+ encryption = cupsEncryption();
for (i = 1; i < argc; i ++)
if (argv[i][0] == '-')
switch (argv[i][1])
{
+ case 'E' : /* Encrypt */
+#ifdef HAVE_LIBSSL
+ encryption = HTTP_ENCRYPT_REQUIRED;
+
+ if (http)
+ httpEncryption(http, encryption);
+#else
+ fprintf(stderr, "%s: Sorry, no encryption support compiled in!\n",
+ argv[0]);
+#endif /* HAVE_LIBSSL */
+ break;
+
case 'l' : /* Show long listing */
long_status = 1;
break;
perror("lpinfo: Unable to connect to server");
return (1);
}
+
+ httpEncryption(http, encryption);
}
show_models(http, long_status);
perror("lpinfo: Unable to connect to server");
return (1);
}
+
+ httpEncryption(http, encryption);
}
show_devices(http, long_status);
perror("lpinfo: Unable to connect to server");
return (1);
}
+
+ httpEncryption(http, encryption);
break;
default :
/*
- * End of "$Id: lpinfo.c,v 1.2 2001/01/22 15:04:02 mike Exp $".
+ * End of "$Id: lpinfo.c,v 1.3 2001/01/23 17:36:23 mike Exp $".
*/
/*
- * "$Id: lpmove.c,v 1.4 2001/01/22 15:04:02 mike Exp $"
+ * "$Id: lpmove.c,v 1.5 2001/01/23 17:36:24 mike Exp $"
*
* "lpmove" command for the Common UNIX Printing System (CUPS).
*
http_t *http; /* Connection to server */
const char *job; /* Job name */
const char *dest; /* New destination */
+ http_encryption_t encryption; /* Encryption? */
- http = NULL;
- job = NULL;
- dest = NULL;
+ http = NULL;
+ job = NULL;
+ dest = NULL;
+ encryption = cupsEncryption();
for (i = 1; i < argc; i ++)
if (argv[i][0] == '-')
switch (argv[i][1])
{
+ case 'E' : /* Encrypt */
+#ifdef HAVE_LIBSSL
+ encryption = HTTP_ENCRYPT_REQUIRED;
+
+ if (http)
+ httpEncryption(http, encryption);
+#else
+ fprintf(stderr, "%s: Sorry, no encryption support compiled in!\n",
+ argv[0]);
+#endif /* HAVE_LIBSSL */
+ break;
+
case 'h' : /* Connect to host */
if (http)
httpClose(http);
perror("lpmove: Unable to connect to server");
return (1);
}
+
+ httpEncryption(http, encryption);
break;
default :
perror("lpmove: Unable to connect to server");
return (1);
}
+
+ httpEncryption(http, encryption);
}
move_job(http, atoi(job), dest);
/*
- * End of "$Id: lpmove.c,v 1.4 2001/01/22 15:04:02 mike Exp $".
+ * End of "$Id: lpmove.c,v 1.5 2001/01/23 17:36:24 mike Exp $".
*/
/*
- * "$Id: lpstat.c,v 1.34 2001/01/22 15:04:03 mike Exp $"
+ * "$Id: lpstat.c,v 1.35 2001/01/23 17:36:24 mike Exp $"
*
* "lpstat" command for the Common UNIX Printing System (CUPS).
*
cups_dest_t *dests; /* User destinations */
int long_status; /* Long status report? */
int ranking; /* Show job ranking? */
+ http_encryption_t encryption; /* Encryption? */
http = NULL;
dests = NULL;
long_status = 0;
ranking = 0;
+ encryption = cupsEncryption();
for (i = 1; i < argc; i ++)
if (argv[i][0] == '-')
long_status = 1;
break;
+ case 'E' : /* Encrypt */
+#ifdef HAVE_LIBSSL
+ encryption = HTTP_ENCRYPT_REQUIRED;
+
+ if (http)
+ httpEncryption(http, encryption);
+#else
+ fprintf(stderr, "%s: Sorry, no encryption support compiled in!\n",
+ argv[0]);
+#endif /* HAVE_LIBSSL */
+ break;
+
case 'P' : /* Show paper types */
break;
perror("lpstat: Unable to connect to server");
return (1);
}
+
+ httpEncryption(http, encryption);
}
if (num_dests == 0)
perror("lpstat: Unable to connect to server");
return (1);
}
+
+ httpEncryption(http, encryption);
}
if (argv[i][2] != '\0')
perror("lpstat: Unable to connect to server");
return (1);
}
+
+ httpEncryption(http, encryption);
break;
case 'l' : /* Long status */
perror("lpstat: Unable to connect to server");
return (1);
}
+
+ httpEncryption(http, encryption);
}
if (argv[i][2] != '\0')
perror("lpstat: Unable to connect to server");
return (1);
}
+
+ httpEncryption(http, encryption);
}
if (num_dests == 0)
perror("lpstat: Unable to connect to server");
return (1);
}
+
+ httpEncryption(http, encryption);
}
show_scheduler(http);
perror("lpstat: Unable to connect to server");
return (1);
}
+
+ httpEncryption(http, encryption);
}
if (num_dests == 0)
perror("lpstat: Unable to connect to server");
return (1);
}
+
+ httpEncryption(http, encryption);
}
if (num_dests == 0)
perror("lpstat: Unable to connect to server");
return (1);
}
+
+ httpEncryption(http, encryption);
}
if (argv[i][2] != '\0')
perror("lpstat: Unable to connect to server");
return (1);
}
+
+ httpEncryption(http, encryption);
}
if (num_dests == 0)
perror("lpstat: Unable to connect to server");
return (1);
}
+
+ httpEncryption(http, encryption);
}
show_jobs(http, argv[i], NULL, long_status, ranking);
perror("lpstat: Unable to connect to server");
return (1);
}
+
+ httpEncryption(http, encryption);
}
show_jobs(http, NULL, cupsUser(), long_status, ranking);
/*
- * End of "$Id: lpstat.c,v 1.34 2001/01/22 15:04:03 mike Exp $".
+ * End of "$Id: lpstat.c,v 1.35 2001/01/23 17:36:24 mike Exp $".
*/