]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
"-E" option for all commands (use encryption.)
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Tue, 23 Jan 2001 17:36:24 +0000 (17:36 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Tue, 23 Jan 2001 17:36:24 +0000 (17:36 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@1522 7a7537e8-13f0-0310-91df-b6672ffda945

24 files changed:
CHANGES.txt
ENCRYPTION.txt
INSTALL.txt
README.txt
berkeley/lpq.c
berkeley/lpr.c
berkeley/lprm.c
man/accept.man
man/enable.man
man/lp.man
man/lpadmin.man
man/lpinfo.man
man/lpmove.man
man/lpq.man
man/lpr.man
man/lprm.man
man/lpstat.man
systemv/accept.c
systemv/cancel.c
systemv/lp.c
systemv/lpadmin.c
systemv/lpinfo.c
systemv/lpmove.c
systemv/lpstat.c

index e061c93aecbd42e0cb759d01150929c3f09e1400..4a53459c410a87f5b46ac1c713b5703c7c3610fc 100644 (file)
@@ -1,4 +1,4 @@
-CHANGES.txt - 01/18/2000
+CHANGES.txt - 01/23/2001
 ------------------------
 
 CHANGES IN CUPS V1.1.6
@@ -48,6 +48,8 @@ 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
index f5f725fa34015e713e8e1b5d10ae233126f99962..38779938f9cff2cf7e46d368c206c23fff874baf 100644 (file)
@@ -1,4 +1,4 @@
-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.
@@ -37,9 +37,12 @@ Stick with "https" for web browsers.
 
 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
 
@@ -60,6 +63,7 @@ variable:
        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
index 597f38cff7bf878baa8151f8017ab6dcb0f21a00..02df345c82dc7b775a5b5043c1d0518056333793 100644 (file)
@@ -1,4 +1,4 @@
-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
@@ -72,6 +72,9 @@ SSL and TLS support require the OpenSSL library, available at:
 
     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
index 278e075d35a30a72f28bb5d9f3b5de12abd8f3c0..83f7c1f570289a18da55bbf30e777b9787a135a1 100644 (file)
@@ -1,4 +1,4 @@
-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"
index 93890cbeb07ae21fef2d222ca06b1695a983e724..24429fb2ffc920b91eacea4c0726824ed1c24a44 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$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).
  *
@@ -39,6 +39,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <ctype.h>
+#include <config.h>
 #include <cups/cups.h>
 #include <cups/language.h>
 #include <cups/debug.h>
@@ -71,13 +72,18 @@ main(int  argc,             /* I - Number of command-line arguments */
                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...
@@ -102,6 +108,18 @@ main(int  argc,            /* I - Number of command-line arguments */
     {
       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;
@@ -513,5 +531,5 @@ show_printer(http_t     *http,      /* I - HTTP connection to server */
 
 
 /*
- * 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 $".
  */
index f726476b8e33051fd0c008d261a8d7b4f71cfa4a..483a420c7358c615218531b6e4ac0f738e5af9a1 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$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).
  *
@@ -33,6 +33,8 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+
+#include <config.h>
 #include <cups/cups.h>
 
 
@@ -97,6 +99,15 @@ main(int  argc,              /* I - Number of command-line arguments */
     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')
@@ -353,5 +364,5 @@ sighandler(int s)   /* I - Signal number */
 
 
 /*
- * 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 $".
  */
index 28cc1cef7663b56f0fe06f50203edce4d2f5f967..048b9fcb5984b630c233970ba921940e274920dc 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$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).
  *
@@ -58,17 +58,19 @@ main(int  argc,                     /* I - Number of command-line arguments */
   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);
 
@@ -87,6 +89,8 @@ main(int  argc,                       /* I - Number of command-line arguments */
     return (1);
   }
 
+  httpEncryption(http, encryption);
+
  /*
   * Process command-line arguments...
   */
@@ -95,6 +99,17 @@ main(int  argc,                      /* I - Number of 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;
@@ -239,5 +254,5 @@ main(int  argc,                     /* I - Number of command-line arguments */
 
 
 /*
- * 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 $".
  */
index f755304d3a7e995f7fef198a9e814d8539a195f7..377f0baeda6aad7576217b333ded0796cbdc59ab 100644 (file)
@@ -1,5 +1,5 @@
 .\"
-.\" "$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).
 .\"
@@ -21,7 +21,7 @@
 .\"       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
@@ -29,7 +29,7 @@ accept/reject \- accept/reject jobs sent to a destination
 destination(s)
 .br
 .B reject
-[ -h
+[ -E ] [ -h
 .I server
 ] [ -r [
 .I reason
@@ -42,6 +42,8 @@ specified destinations.
 \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
@@ -54,5 +56,5 @@ http://localhost:631/documentation.html
 .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 $".
 .\"
index 43f651a7d09d0ca41cabf81e02c3450d5c06d6c7..b6af43dcdf5e7da011365f6d71ffbae81972f03a 100644 (file)
@@ -1,5 +1,5 @@
 .\"
-.\" "$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
@@ -48,6 +48,8 @@ Cancels all jobs on the named destination.
 .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
@@ -61,5 +63,5 @@ http://localhost:631/documentation.html
 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 $".
 .\"
index 6fc9fd978301599554c773c5ed15e1efd34a5286..a2576247fd80067e9b754b3ac56aea46056a7240 100644 (file)
@@ -1,5 +1,5 @@
 .\"
-.\" "$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
@@ -68,6 +68,10 @@ all jobs from the specified destination.
 .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.
@@ -131,5 +135,5 @@ http://localhost:631/documentation.html
 .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 $".
 .\"
index 2d9d54d0730bf56f2992352b3737aefebca88175..42e362cadbd7ed5a04a085d6a884873cc01c3f88 100644 (file)
@@ -1,5 +1,5 @@
 .\"
-.\" "$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
@@ -47,6 +47,8 @@ lpadmin \- configure cups printers and classes
 \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
@@ -134,5 +136,5 @@ http://localhost:631/documentation.html
 .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 $".
 .\"
index 3e156f0d2cbf7aaf9129e0198d6fca5e80113f64..181949e3222bf6deee7332e1b889384b62474532 100644 (file)
@@ -1,5 +1,5 @@
 .\"
-.\" "$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.
@@ -52,5 +56,5 @@ http://localhost:631/documentation.html
 .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 $".
 .\"
index 611bdbccae7583493b4f4898b7be826cc0f4bd80..ec59d6e501d8ebdf0d88eaab12f2a3a33270d79d 100644 (file)
@@ -1,5 +1,5 @@
 .\"
-.\" "$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
@@ -36,6 +37,8 @@ can be the job ID number or the old destination and job ID:
      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.
@@ -46,5 +49,5 @@ http://localhost:631/documentation.html
 .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 $".
 .\"
index ef2c987e3fe38b236e39b8d1e55edbb9c62d25c5..a3f9e933bfb9794b2906387b13c7fc5318ef1b74 100644 (file)
@@ -1,5 +1,5 @@
 .\"
-.\" "$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
@@ -40,6 +40,8 @@ The \fIinterval\fR option allows you to continuously report the jobs
 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)
@@ -49,5 +51,5 @@ http://localhost:631/documentation.html
 .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 $".
 .\"
index 8e41cecd73b59a282ae3f83dc67da5ee3bdb6a1b..d399ce4c88bfce5197dd1d9538b1805c3fb2b005 100644 (file)
@@ -1,5 +1,5 @@
 .\"
-.\" "$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
@@ -45,6 +45,10 @@ print file from the standard input.
 .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.
@@ -93,5 +97,5 @@ http://localhost:631/documentation.html
 .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 $".
 .\"
index 93e94a1d2572d832aca8a27c81d1f198e7bccdb4..5816d1aa28a16bcd949e38dde348f8b7a043be1f 100644 (file)
@@ -1,5 +1,5 @@
 .\"
-.\" "$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)
@@ -38,6 +38,8 @@ option specifies the destination printer or class.
 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.
@@ -48,5 +50,5 @@ http://localhost:631/documentation.html
 .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 $".
 .\"
index 8f00645ef66283e4acd9799402f1da58315c4620..206f303aee6adc31f6e487f238798fd93687193a 100644 (file)
@@ -1,5 +1,5 @@
 .\"
-.\" "$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)
@@ -46,6 +46,10 @@ lpstat \- print cups status information
 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
@@ -122,5 +126,5 @@ http://localhost:631/documentation.html
 .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 $".
 .\"
index 976f5faf580f73267ecbd59e270a058fd7697947..e2515e5df455c1dfa0a1e18ceb633049d8b1c48c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$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).
@@ -35,6 +35,7 @@
 #include <stdlib.h>
 #include <ctype.h>
 
+#include <config.h>
 #include <cups/cups.h>
 #include <cups/language.h>
 
@@ -61,6 +62,7 @@ main(int  argc,                       /* I - Number of command-line arguments */
   ipp_op_t     op;             /* Operation */
   cups_lang_t  *language;      /* Language */
   int          cancel;         /* Cancel jobs? */
+  http_encryption_t encryption;        /* Encryption? */
 
 
  /*
@@ -88,8 +90,9 @@ main(int  argc,                       /* I - Number of command-line arguments */
     return (1);
   }
 
-  http   = NULL;
-  reason = NULL;
+  http       = NULL;
+  reason     = NULL;
+  encryption = cupsEncryption();
 
  /*
   * Process command-line arguments...
@@ -99,6 +102,18 @@ main(int  argc,                     /* I - Number of 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;
@@ -211,6 +226,8 @@ main(int  argc,                     /* I - Number of command-line arguments */
       * 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)
@@ -289,5 +306,5 @@ main(int  argc,                     /* I - Number of command-line arguments */
 
 
 /*
- * 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 $".
  */
index 5385ae88d893664b752dde0c620447aa3b4c1d15..45c53013853bfeded29cd43ce4ce6285fb85db44 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$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).
  *
@@ -34,6 +34,7 @@
 #include <stdlib.h>
 #include <ctype.h>
 
+#include <config.h>
 #include <cups/cups.h>
 #include <cups/language.h>
 
@@ -57,16 +58,18 @@ main(int  argc,                     /* I - Number of command-line arguments */
   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...
@@ -76,6 +79,18 @@ main(int  argc,                      /* I - Number of 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;
@@ -222,6 +237,8 @@ main(int  argc,                     /* I - Number of command-line arguments */
       * Do the request and get back a response...
       */
 
+      httpEncryption(http, encryption);
+
       if (op == IPP_PURGE_JOBS)
         response = cupsDoRequest(http, request, "/admin/");
       else
@@ -249,5 +266,5 @@ main(int  argc,                     /* I - Number of command-line arguments */
 
 
 /*
- * 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 $".
  */
index 8d582925952e05ccc91bcbf27a00929059636f29..9dd3cbd6086ebdf9fe51c45d502ad2ff8cffcab9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$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).
  *
@@ -121,6 +121,15 @@ main(int  argc,            /* I - Number of command-line arguments */
     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;
 
@@ -638,5 +647,5 @@ sighandler(int s)   /* I - Signal number */
 
 
 /*
- * 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 $".
  */
index 75c48ee4ea2c7383fa060766b89256784b1ed627..6a8ce0a6c92a96f3eccebd71fb0979c5a165f30b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$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).
  *
@@ -90,12 +90,14 @@ main(int  argc,                     /* I - Number of command-line arguments */
   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;
@@ -114,6 +116,8 @@ main(int  argc,                     /* I - Number of command-line arguments */
                perror("lpadmin: Unable to connect to server");
                return (1);
              }
+
+              httpEncryption(http, encryption);
             }
 
            if (printer == NULL)
@@ -157,6 +161,8 @@ main(int  argc,                     /* I - Number of command-line arguments */
                perror("lpadmin: Unable to connect to server");
                return (1);
              }
+
+              httpEncryption(http, encryption);
             }
 
            if (argv[i][2])
@@ -209,7 +215,10 @@ main(int  argc,                    /* I - Number of command-line arguments */
              return (1);
            }
            else
+           {
+              httpEncryption(http, encryption);
              cupsSetServer(http->hostname);
+           }
            break;
 
         case 'i' : /* Use the specified interface script */
@@ -222,6 +231,8 @@ main(int  argc,                     /* I - Number of command-line arguments */
                perror("lpadmin: Unable to connect to server");
                return (1);
              }
+
+              httpEncryption(http, encryption);
             }
 
            if (printer == NULL)
@@ -248,6 +259,20 @@ main(int  argc,                    /* I - Number of command-line arguments */
            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());
@@ -257,14 +282,9 @@ main(int  argc,                    /* I - Number of command-line arguments */
                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;
@@ -279,6 +299,8 @@ main(int  argc,                     /* I - Number of command-line arguments */
                perror("lpadmin: Unable to connect to server");
                return (1);
              }
+
+              httpEncryption(http, encryption);
             }
 
            if (printer == NULL)
@@ -335,6 +357,8 @@ main(int  argc,                     /* I - Number of command-line arguments */
                perror("lpadmin: Unable to connect to server");
                return (1);
              }
+
+              httpEncryption(http, encryption);
             }
 
            if (argv[i][2])
@@ -372,6 +396,8 @@ main(int  argc,                     /* I - Number of command-line arguments */
                perror("lpadmin: Unable to connect to server");
                return (1);
              }
+
+              httpEncryption(http, encryption);
            }
            break;
 
@@ -385,6 +411,8 @@ main(int  argc,                     /* I - Number of command-line arguments */
                perror("lpadmin: Unable to connect to server");
                return (1);
              }
+
+              httpEncryption(http, encryption);
             }
 
            if (printer == NULL)
@@ -458,6 +486,8 @@ main(int  argc,                     /* I - Number of command-line arguments */
                perror("lpadmin: Unable to connect to server");
                return (1);
              }
+
+              httpEncryption(http, encryption);
             }
 
            if (printer == NULL)
@@ -493,6 +523,8 @@ main(int  argc,                     /* I - Number of command-line arguments */
                perror("lpadmin: Unable to connect to server");
                return (1);
              }
+
+              httpEncryption(http, encryption);
             }
 
            if (argv[i][2])
@@ -546,6 +578,8 @@ main(int  argc,                     /* I - Number of command-line arguments */
                perror("lpadmin: Unable to connect to server");
                return (1);
              }
+
+              httpEncryption(http, encryption);
             }
 
            if (printer == NULL)
@@ -581,6 +615,8 @@ main(int  argc,                     /* I - Number of command-line arguments */
                perror("lpadmin: Unable to connect to server");
                return (1);
              }
+
+              httpEncryption(http, encryption);
             }
 
            if (printer == NULL)
@@ -616,6 +652,8 @@ main(int  argc,                     /* I - Number of command-line arguments */
                perror("lpadmin: Unable to connect to server");
                return (1);
              }
+
+              httpEncryption(http, encryption);
             }
 
            if (printer == NULL)
@@ -666,6 +704,8 @@ main(int  argc,                     /* I - Number of command-line arguments */
        perror("lpadmin: Unable to connect to server");
        return (1);
       }
+
+      httpEncryption(http, encryption);
     }
 
     if (printer == NULL)
@@ -1759,5 +1799,5 @@ validate_name(const char *name)   /* I - Name to check */
 
 
 /*
- * 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 $".
  */
index 673fa645bf4aece9676383f992a50ea4bc0daf5f..c8cbc92cc1e7a5b02205f5c95984a6adbcc6604c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$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).
  *
@@ -60,15 +60,29 @@ main(int  argc,                     /* I - Number of command-line arguments */
   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;
@@ -83,6 +97,8 @@ main(int  argc,                       /* I - Number of command-line arguments */
                perror("lpinfo: Unable to connect to server");
                return (1);
              }
+
+             httpEncryption(http, encryption);
             }
 
             show_models(http, long_status);
@@ -98,6 +114,8 @@ main(int  argc,                      /* I - Number of command-line arguments */
                perror("lpinfo: Unable to connect to server");
                return (1);
              }
+
+             httpEncryption(http, encryption);
             }
 
             show_devices(http, long_status);
@@ -127,6 +145,8 @@ main(int  argc,                     /* I - Number of command-line arguments */
              perror("lpinfo: Unable to connect to server");
              return (1);
            }
+
+           httpEncryption(http, encryption);
            break;
 
        default :
@@ -426,5 +446,5 @@ show_models(http_t *http,   /* I - HTTP connection to server */
 
 
 /*
- * 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 $".
  */
index 7ab2ef81dd118cf97748eef9382fdbfa281999ab..8294f60a5f9fea3623c730e747cf30077256be74 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$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).
  *
@@ -59,16 +59,30 @@ main(int  argc,                     /* I - Number of command-line arguments */
   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);
@@ -93,6 +107,8 @@ main(int  argc,                      /* I - Number of command-line arguments */
              perror("lpmove: Unable to connect to server");
              return (1);
            }
+
+           httpEncryption(http, encryption);
            break;
 
        default :
@@ -129,6 +145,8 @@ main(int  argc,                     /* I - Number of command-line arguments */
       perror("lpmove: Unable to connect to server");
       return (1);
     }
+
+    httpEncryption(http, encryption);
   }
 
   move_job(http, atoi(job), dest);
@@ -214,5 +232,5 @@ move_job(http_t     *http,  /* I - HTTP connection to server */
 
 
 /*
- * 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 $".
  */
index c1e098c4c1246169f1120e483e116056804e958d..0abd390a18cc04440a4284a66a608a91017d15bf 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$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).
  *
@@ -74,6 +74,7 @@ main(int  argc,                       /* I - Number of command-line arguments */
   cups_dest_t  *dests;         /* User destinations */
   int          long_status;    /* Long status report? */
   int          ranking;        /* Show job ranking? */
+  http_encryption_t encryption;        /* Encryption? */
 
 
   http        = NULL;
@@ -81,6 +82,7 @@ main(int  argc,                       /* I - Number of command-line arguments */
   dests       = NULL;
   long_status = 0;
   ranking     = 0;
+  encryption  = cupsEncryption();
 
   for (i = 1; i < argc; i ++)
     if (argv[i][0] == '-')
@@ -90,6 +92,18 @@ main(int  argc,                      /* I - Number of command-line arguments */
            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;
            
@@ -112,6 +126,8 @@ main(int  argc,                     /* I - Number of command-line arguments */
                perror("lpstat: Unable to connect to server");
                return (1);
              }
+
+             httpEncryption(http, encryption);
             }
 
             if (num_dests == 0)
@@ -138,6 +154,8 @@ main(int  argc,                     /* I - Number of command-line arguments */
                perror("lpstat: Unable to connect to server");
                return (1);
              }
+
+             httpEncryption(http, encryption);
             }
 
            if (argv[i][2] != '\0')
@@ -192,6 +210,8 @@ main(int  argc,                     /* I - Number of command-line arguments */
              perror("lpstat: Unable to connect to server");
              return (1);
            }
+
+           httpEncryption(http, encryption);
            break;
 
         case 'l' : /* Long status */
@@ -208,6 +228,8 @@ main(int  argc,                     /* I - Number of command-line arguments */
                perror("lpstat: Unable to connect to server");
                return (1);
              }
+
+             httpEncryption(http, encryption);
             }
 
            if (argv[i][2] != '\0')
@@ -231,6 +253,8 @@ main(int  argc,                     /* I - Number of command-line arguments */
                perror("lpstat: Unable to connect to server");
                return (1);
              }
+
+             httpEncryption(http, encryption);
             }
 
             if (num_dests == 0)
@@ -257,6 +281,8 @@ main(int  argc,                     /* I - Number of command-line arguments */
                perror("lpstat: Unable to connect to server");
                return (1);
              }
+
+             httpEncryption(http, encryption);
             }
 
            show_scheduler(http);
@@ -272,6 +298,8 @@ main(int  argc,                     /* I - Number of command-line arguments */
                perror("lpstat: Unable to connect to server");
                return (1);
              }
+
+             httpEncryption(http, encryption);
             }
 
             if (num_dests == 0)
@@ -292,6 +320,8 @@ main(int  argc,                     /* I - Number of command-line arguments */
                perror("lpstat: Unable to connect to server");
                return (1);
              }
+
+             httpEncryption(http, encryption);
             }
 
             if (num_dests == 0)
@@ -316,6 +346,8 @@ main(int  argc,                     /* I - Number of command-line arguments */
                perror("lpstat: Unable to connect to server");
                return (1);
              }
+
+             httpEncryption(http, encryption);
             }
 
            if (argv[i][2] != '\0')
@@ -339,6 +371,8 @@ main(int  argc,                     /* I - Number of command-line arguments */
                perror("lpstat: Unable to connect to server");
                return (1);
              }
+
+             httpEncryption(http, encryption);
             }
 
             if (num_dests == 0)
@@ -371,6 +405,8 @@ main(int  argc,                     /* I - Number of command-line arguments */
          perror("lpstat: Unable to connect to server");
          return (1);
        }
+
+       httpEncryption(http, encryption);
       }
 
       show_jobs(http, argv[i], NULL, long_status, ranking);
@@ -387,6 +423,8 @@ main(int  argc,                     /* I - Number of command-line arguments */
        perror("lpstat: Unable to connect to server");
        return (1);
       }
+
+      httpEncryption(http, encryption);
     }
 
     show_jobs(http, NULL, cupsUser(), long_status, ranking);
@@ -1832,5 +1870,5 @@ show_scheduler(http_t *http)      /* I - HTTP connection to server */
 
 
 /*
- * 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 $".
  */