]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix SSL support on Windows (STR #4358)
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Fri, 28 Mar 2014 12:58:24 +0000 (12:58 +0000)
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Fri, 28 Mar 2014 12:58:24 +0000 (12:58 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/branches/branch-1.7@11760 a1ca3aef-8c08-0410-bb20-df032aa958be

CHANGES-IPPTOOL.txt
CHANGES.txt
IPPTOOL.txt
cups/http.c
cups/sspi.c
vcnet/ipptool-installer.vdproj
vcnet/setdebug.bat

index 15066ae1de24e3ac8c56bbd7e7b4eb654eb66918..cc42e2b0f8bc64b3e62fb024a5d11d5237b947b2 100644 (file)
@@ -1,9 +1,14 @@
-CHANGES-IPPTOOL.txt - 2013-07-15
+CHANGES-IPPTOOL.txt - 2014-03-28
 --------------------------------
 
 This file provides a list of changes to the ipptool binary distribution posted
 on cups.org.
 
+2014-03-28
+
+       - Fixed SSL support on Windows (STR #4358)
+
+
 2013-07-15
 
        - New ippfind tool now included with ipptool.
index 4cd505eabaa19118cc84ce1a02a9a211ac7aa29a..c64e6948ed2cfb42cc855730cc646b4dc2fa1852 100644 (file)
@@ -8,6 +8,7 @@ CHANGES IN CUPS V1.7.2
        - Documentation fixes (STR #3259, STR #4346, STR #4355)
        - Fixed the Japanese localization (STR #4385)
        - Added a German localization (STR #4363)
+       - Fixed SSL support on Windows (STR #4358)
        - Fixed documentation and naming of Create-Job/Printer-Subscriptions
          operations (STR #4389)
        - Phone numbers in fax jobs were not properly filtered for IPP FaxOut
index 2293a45e2974ba867c1d7091338ecd345d52ea5a..301ec5461bb7bc5da32855e8013759d964457a7b 100644 (file)
@@ -1,4 +1,4 @@
-IPPTOOL.txt - 2013-07-15
+IPPTOOL.txt - 2014-03-28
 ------------------------
 
 See the file CHANGES-IPPTOOL.txt for a list of changes to this software.
@@ -220,7 +220,7 @@ REPORTING BUGS
 
 LEGAL STUFF
 
-    CUPS is Copyright 2007-2013 by Apple Inc.  CUPS and the CUPS logo are
+    CUPS is Copyright 2007-2014 by Apple Inc.  CUPS and the CUPS logo are
     trademarks of Apple Inc.
 
     The MD5 Digest code is Copyright 1999 Aladdin Enterprises.
index 17f55c5d646ea7523ef91e9a319c36d2e12b1695..b210f4036592778deb8b8f1b779f5c27e8eff5d1 100644 (file)
@@ -3,7 +3,7 @@
  *
  * HTTP routines for CUPS.
  *
- * Copyright 2007-2013 by Apple Inc.
+ * Copyright 2007-2014 by Apple Inc.
  * Copyright 1997-2007 by Easy Software Products, all rights reserved.
  *
  * This file contains Kerberos support code, copyright 2006 by Jelmer Vernooij.
@@ -5396,6 +5396,7 @@ http_setup_ssl(http_t *http)              /* I - Connection to server */
 
   if (!http->tls)
   {
+    DEBUG_puts("8http_setup_ssl: Unable to allocate SSPI data.");
     _cupsSetHTTPError(HTTP_STATUS_ERROR);
     return (-1);
   }
@@ -5406,11 +5407,14 @@ http_setup_ssl(http_t *http)            /* I - Connection to server */
   _sntprintf_s(commonName, sizeof(commonName) / sizeof(TCHAR),
                sizeof(commonName) / sizeof(TCHAR), TEXT("CN=%s"), username);
 
-  if (!_sspiGetCredentials(http->tls_credentials, L"ClientContainer",
-                           commonName, FALSE))
+  DEBUG_printf(("8http_setup_ssl: commonName=\"%s\"", commonName));
+
+  if (!_sspiGetCredentials(http->tls, L"ClientContainer", commonName, FALSE))
   {
-    _sspiFree(http->tls_credentials);
-    http->tls_credentials = NULL;
+    DEBUG_puts("8http_setup_ssl: _sspiGetCredentials failed.");
+
+    _sspiFree(http->tls);
+    http->tls = NULL;
 
     http->error  = EIO;
     http->status = HTTP_STATUS_ERROR;
@@ -5421,13 +5425,15 @@ http_setup_ssl(http_t *http)            /* I - Connection to server */
     return (-1);
   }
 
-  _sspiSetAllowsAnyRoot(http->tls_credentials, TRUE);
-  _sspiSetAllowsExpiredCerts(http->tls_credentials, TRUE);
+  _sspiSetAllowsAnyRoot(http->tls, TRUE);
+  _sspiSetAllowsExpiredCerts(http->tls, TRUE);
 
-  if (!_sspiConnect(http->tls_credentials, hostname))
+  if (!_sspiConnect(http->tls, hostname))
   {
-    _sspiFree(http->tls_credentials);
-    http->tls_credentials = NULL;
+    DEBUG_printf(("8http_setup_ssl: _sspiConnect failed for \"%s\".", hostname));
+
+    _sspiFree(http->tls);
+    http->tls = NULL;
 
     http->error  = EIO;
     http->status = HTTP_STATUS_ERROR;
index 0efcb56793cfbd3b5748ff04a0dc291439c852ee..cbe3c8d45b29011167fe427204ad1dd7edd512a2 100644 (file)
@@ -1,35 +1,15 @@
 /*
  * "$Id$"
  *
- *   Windows SSPI SSL implementation for CUPS.
+ * Windows SSPI SSL implementation for CUPS.
  *
- *   Copyright 2010-2011 by Apple Inc.
+ * Copyright 2010-2014 by Apple Inc.
  *
- *   These coded instructions, statements, and computer programs are the
- *   property of Apple Inc. and are protected by Federal copyright
- *   law.  Distribution and use rights are outlined in the file "LICENSE.txt"
- *   which should have been included with this file.  If this file is
- *   file is missing or damaged, see the license at "http://www.cups.org/".
- *
- * Contents:
- *
- *   sspi_alloc()                 - Allocate SSPI ssl object
- *   _sspiGetCredentials()        - Retrieve an SSL/TLS certificate from the
- *                                  system store If one cannot be found, one is
- *                                  created.
- *   _sspiConnect()               - Make an SSL connection. This function
- *                                  assumes a TCP/IP connection has already been
- *                                  successfully made
- *   _sspiAccept()                - Accept an SSL/TLS connection
- *   _sspiSetAllowsAnyRoot()      - Set the client cert policy for untrusted
- *                                  root certs
- *   _sspiSetAllowsExpiredCerts() - Set the client cert policy for expired root
- *                                  certs
- *   _sspiWrite()                 - Write a buffer to an ssl socket
- *   _sspiRead()                  - Read a buffer from an ssl socket
- *   _sspiPending()               - Returns the number of available bytes
- *   _sspiFree()                  - Close a connection and free resources
- *   sspi_verify_certificate()    - Verify a server certificate
+ * These coded instructions, statements, and computer programs are the
+ * property of Apple Inc. and are protected by Federal copyright
+ * law.  Distribution and use rights are outlined in the file "LICENSE.txt"
+ * which should have been included with this file.  If this file is
+ * file is missing or damaged, see the license at "http://www.cups.org/".
  */
 
 /*
@@ -108,6 +88,9 @@ _sspiGetCredentials(_sspi_struct_t *conn,
   CRYPT_KEY_PROV_INFO  ckp;            /* Handle to crypto key */
   BOOL                 ok = TRUE;      /* Return value */
 
+
+  DEBUG_printf(("_sspiGetCredentials(conn=%p, container=%p, cn=\"%s\", isServer=%d)", conn, container, cn, isServer));
+
   if (!conn)
     return (FALSE);
   if (!cn)
index 555cd2e4824719be90a5a3dde2f3863aa15c9172..64e65c825b26bfc8b1b8356ae142f1749e82e668 100644 (file)
         }\r
         "Entry"\r
         {\r
-        "MsmKey" = "8:_4273A45FE6E54897AC9A4F66D9AA59EC"\r
-        "OwnerKey" = "8:_8A6033CAC27E4C1185B4FDF7D2BF8D2E"\r
+        "MsmKey" = "8:_4454D1BB58774F95972FB94388DC5E6A"\r
+        "OwnerKey" = "8:_UNDEFINED"\r
         "MsmSig" = "8:_UNDEFINED"\r
         }\r
         "Entry"\r
         {\r
-        "MsmKey" = "8:_4454D1BB58774F95972FB94388DC5E6A"\r
+        "MsmKey" = "8:_46AB64FF360D4F309866FF5F49C65D88"\r
         "OwnerKey" = "8:_UNDEFINED"\r
         "MsmSig" = "8:_UNDEFINED"\r
         }\r
         "Entry"\r
         {\r
-        "MsmKey" = "8:_46AB64FF360D4F309866FF5F49C65D88"\r
-        "OwnerKey" = "8:_UNDEFINED"\r
+        "MsmKey" = "8:_4FEB166CB8954184934B4C82D1A99107"\r
+        "OwnerKey" = "8:_73D53D5857124164BE3824FD94E0CB2A"\r
         "MsmSig" = "8:_UNDEFINED"\r
         }\r
         "Entry"\r
         }\r
         "Entry"\r
         {\r
-        "MsmKey" = "8:_80DBA85C961E447CB92C95CE1F38C56B"\r
-        "OwnerKey" = "8:_UNDEFINED"\r
+        "MsmKey" = "8:_73D53D5857124164BE3824FD94E0CB2A"\r
+        "OwnerKey" = "8:_58DC0E72F0944BEFB927AED718CD1660"\r
         "MsmSig" = "8:_UNDEFINED"\r
         }\r
         "Entry"\r
         {\r
-        "MsmKey" = "8:_842C04D73EBC4F5DBC2FD58D5B98D5D1"\r
-        "OwnerKey" = "8:_UNDEFINED"\r
+        "MsmKey" = "8:_73D53D5857124164BE3824FD94E0CB2A"\r
+        "OwnerKey" = "8:_EA282F32A10B4ED1A81AA6133B997C6A"\r
         "MsmSig" = "8:_UNDEFINED"\r
         }\r
         "Entry"\r
         {\r
-        "MsmKey" = "8:_8A6033CAC27E4C1185B4FDF7D2BF8D2E"\r
-        "OwnerKey" = "8:_58DC0E72F0944BEFB927AED718CD1660"\r
+        "MsmKey" = "8:_73D53D5857124164BE3824FD94E0CB2A"\r
+        "OwnerKey" = "8:_E97571D3FBE048DABDC59B37762D800F"\r
         "MsmSig" = "8:_UNDEFINED"\r
         }\r
         "Entry"\r
         {\r
-        "MsmKey" = "8:_8A6033CAC27E4C1185B4FDF7D2BF8D2E"\r
-        "OwnerKey" = "8:_EA282F32A10B4ED1A81AA6133B997C6A"\r
+        "MsmKey" = "8:_73D53D5857124164BE3824FD94E0CB2A"\r
+        "OwnerKey" = "8:_D02EB13951314EFD9C539150EF8E53B8"\r
         "MsmSig" = "8:_UNDEFINED"\r
         }\r
         "Entry"\r
         {\r
-        "MsmKey" = "8:_8A6033CAC27E4C1185B4FDF7D2BF8D2E"\r
-        "OwnerKey" = "8:_E97571D3FBE048DABDC59B37762D800F"\r
+        "MsmKey" = "8:_80DBA85C961E447CB92C95CE1F38C56B"\r
+        "OwnerKey" = "8:_UNDEFINED"\r
         "MsmSig" = "8:_UNDEFINED"\r
         }\r
         "Entry"\r
         {\r
-        "MsmKey" = "8:_8A6033CAC27E4C1185B4FDF7D2BF8D2E"\r
-        "OwnerKey" = "8:_D02EB13951314EFD9C539150EF8E53B8"\r
+        "MsmKey" = "8:_842C04D73EBC4F5DBC2FD58D5B98D5D1"\r
+        "OwnerKey" = "8:_UNDEFINED"\r
         "MsmSig" = "8:_UNDEFINED"\r
         }\r
         "Entry"\r
         {\r
         "Name" = "8:Microsoft Visual Studio"\r
         "ProductName" = "8:ipptool for Windows"\r
-        "ProductCode" = "8:{5B0420A3-BD82-4698-B8A1-9D9EC51A7836}"\r
-        "PackageCode" = "8:{ECECE842-1E95-48BD-962D-A4E62FBB5F89}"\r
+        "ProductCode" = "8:{B5950B89-CE18-455C-B176-E0B74DCDF400}"\r
+        "PackageCode" = "8:{0307E5A5-247E-4097-A50B-35A35B548502}"\r
         "UpgradeCode" = "8:{BAB6EBBB-515D-4155-9FEF-D98DA76814CA}"\r
         "RestartWWWService" = "11:FALSE"\r
         "RemovePreviousVersions" = "11:TRUE"\r
         "DetectNewerInstalledVersion" = "11:TRUE"\r
         "InstallAllUsers" = "11:TRUE"\r
-        "ProductVersion" = "8:13.07.3100"\r
+        "ProductVersion" = "8:14.03.2800"\r
         "Manufacturer" = "8:Apple Inc."\r
         "ARPHELPTELEPHONE" = "8:"\r
         "ARPHELPLINK" = "8:http://www.cups.org/str.php"\r
         }\r
         "MergeModule"\r
         {\r
-            "{CEE29DC0-9FBA-4B99-8D47-5BC643D9B626}:_4273A45FE6E54897AC9A4F66D9AA59EC"\r
+            "{CEE29DC0-9FBA-4B99-8D47-5BC643D9B626}:_4FEB166CB8954184934B4C82D1A99107"\r
             {\r
             "UseDynamicProperties" = "11:TRUE"\r
             "IsDependency" = "11:TRUE"\r
             "Feature" = "8:"\r
             "IsolateTo" = "8:"\r
             }\r
-            "{CEE29DC0-9FBA-4B99-8D47-5BC643D9B626}:_8A6033CAC27E4C1185B4FDF7D2BF8D2E"\r
+            "{CEE29DC0-9FBA-4B99-8D47-5BC643D9B626}:_73D53D5857124164BE3824FD94E0CB2A"\r
             {\r
             "UseDynamicProperties" = "11:TRUE"\r
             "IsDependency" = "11:TRUE"\r
         {\r
             "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_58DC0E72F0944BEFB927AED718CD1660"\r
             {\r
-            "SourcePath" = "8:Win32\\Release\\ippfind.exe"\r
+            "SourcePath" = "8:Win32\\Debug\\ippfind.exe"\r
             "TargetName" = "8:"\r
             "Tag" = "8:"\r
             "Folder" = "8:_FFAEDEA1D38D4088A03FDD6F17E2CA5D"\r
             }\r
             "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_D02EB13951314EFD9C539150EF8E53B8"\r
             {\r
-            "SourcePath" = "8:Win32\\Release\\regex.dll"\r
+            "SourcePath" = "8:Win32\\Debug\\regex.dll"\r
             "TargetName" = "8:"\r
             "Tag" = "8:"\r
             "Folder" = "8:_FFAEDEA1D38D4088A03FDD6F17E2CA5D"\r
             }\r
             "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_E97571D3FBE048DABDC59B37762D800F"\r
             {\r
-            "SourcePath" = "8:Win32\\Release\\ipptool.exe"\r
+            "SourcePath" = "8:Win32\\Debug\\ipptool.exe"\r
             "TargetName" = "8:"\r
             "Tag" = "8:"\r
             "Folder" = "8:_FFAEDEA1D38D4088A03FDD6F17E2CA5D"\r
             }\r
             "{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_EA282F32A10B4ED1A81AA6133B997C6A"\r
             {\r
-            "SourcePath" = "8:Win32\\Release\\libcups2.dll"\r
+            "SourcePath" = "8:Win32\\Debug\\libcups2.dll"\r
             "TargetName" = "8:"\r
             "Tag" = "8:"\r
             "Folder" = "8:_FFAEDEA1D38D4088A03FDD6F17E2CA5D"\r
index dd1afa698268fb86ad597d2a8b4c57f2e739b96d..b780dd29d175fab6b4136a1f5d726c1b018b25e2 100644 (file)
@@ -1,5 +1,5 @@
 @rem Script to enable debug logging for IPPTOOL
 set CUPS_DEBUG_LOG=ipptool.log
 set CUPS_DEBUG_LEVEL=6
-set "CUPS_DEBUG_FILTER=^(http|_http|ipp|_ipp|cupsDo|cupsGetResponse|cupsSend|cupsWrite)"
+set "CUPS_DEBUG_FILTER=^(http|_http|ipp|_ipp|cupsDo|cupsGetResponse|cupsSend|cupsWrite|sspi|_sspi)"