Author: sserapion
Date: Thu May 12 16:53:49 2011
New Revision: 51686

URL: http://svn.reactos.org/svn/reactos?rev=51686&view=rev
Log:
[secur32]
- Fix copy/paste mistakes.
- Uncomment some code.
- add SealMessage stub.

Modified:
    branches/sspi-bringup/reactos/dll/win32/secur32/precomp.h
    branches/sspi-bringup/reactos/dll/win32/secur32/secur32.c
    branches/sspi-bringup/reactos/dll/win32/secur32/secur32.spec
    branches/sspi-bringup/reactos/dll/win32/secur32/sspi.c
    branches/sspi-bringup/reactos/dll/win32/secur32/stubs.c
    branches/sspi-bringup/reactos/dll/win32/secur32/wrapper.c

Modified: branches/sspi-bringup/reactos/dll/win32/secur32/precomp.h
URL: 
http://svn.reactos.org/svn/reactos/branches/sspi-bringup/reactos/dll/win32/secur32/precomp.h?rev=51686&r1=51685&r2=51686&view=diff
==============================================================================
--- branches/sspi-bringup/reactos/dll/win32/secur32/precomp.h [iso-8859-1] 
(original)
+++ branches/sspi-bringup/reactos/dll/win32/secur32/precomp.h [iso-8859-1] Thu 
May 12 16:53:49 2011
@@ -31,3 +31,7 @@
 #include "secur32_priv.h"
 #include "thunks.h"
 
+
+extern SecurityFunctionTableA securityFunctionTableA;
+extern SecurityFunctionTableW securityFunctionTableW;
+

Modified: branches/sspi-bringup/reactos/dll/win32/secur32/secur32.c
URL: 
http://svn.reactos.org/svn/reactos/branches/sspi-bringup/reactos/dll/win32/secur32/secur32.c?rev=51686&r1=51685&r2=51686&view=diff
==============================================================================
--- branches/sspi-bringup/reactos/dll/win32/secur32/secur32.c [iso-8859-1] 
(original)
+++ branches/sspi-bringup/reactos/dll/win32/secur32/secur32.c [iso-8859-1] Thu 
May 12 16:53:49 2011
@@ -37,68 +37,6 @@
 CRITICAL_SECTION cs;
 SecurePackageTable *packageTable = NULL;
 SecureProviderTable *providerTable = NULL;
-
-static SecurityFunctionTableA securityFunctionTableA = {
-    SECURITY_SUPPORT_PROVIDER_INTERFACE_VERSION,
-    EnumerateSecurityPackagesA,
-    QueryCredentialsAttributesA,
-    AcquireCredentialsHandleA,
-    FreeCredentialsHandle,
-    NULL, /* Reserved2 */
-    InitializeSecurityContextA,
-    AcceptSecurityContext,
-    CompleteAuthToken,
-    DeleteSecurityContext,
-    ApplyControlToken,
-    QueryContextAttributesA,
-    ImpersonateSecurityContext,
-    RevertSecurityContext,
-    MakeSignature,
-    VerifySignature,
-    FreeContextBuffer,
-    QuerySecurityPackageInfoA,
-    EncryptMessage, /* Reserved3 */
-    DecryptMessage, /* Reserved4 */
-    ExportSecurityContext,
-    ImportSecurityContextA,
-    AddCredentialsA,
-    NULL, /* Reserved8 */
-    QuerySecurityContextToken,
-    EncryptMessage,
-    DecryptMessage,
-    SetContextAttributesA
-};
-
-static SecurityFunctionTableW securityFunctionTableW = {
-    SECURITY_SUPPORT_PROVIDER_INTERFACE_VERSION,
-    EnumerateSecurityPackagesW,
-    QueryCredentialsAttributesW,
-    AcquireCredentialsHandleW,
-    FreeCredentialsHandle,
-    NULL, /* Reserved2 */
-    InitializeSecurityContextW,
-    AcceptSecurityContext,
-    CompleteAuthToken,
-    DeleteSecurityContext,
-    ApplyControlToken,
-    QueryContextAttributesW,
-    ImpersonateSecurityContext,
-    RevertSecurityContext,
-    MakeSignature,
-    VerifySignature,
-    FreeContextBuffer,
-    QuerySecurityPackageInfoW,
-    EncryptMessage, /* Reserved3 */
-    DecryptMessage, /* Reserved4 */
-    ExportSecurityContext,
-    ImportSecurityContextW,
-    AddCredentialsW,
-    NULL, /* Reserved8 */
-    QuerySecurityContextToken,
-    EncryptMessage,
-    DecryptMessage,
-    SetContextAttributesW
-};
 
 static PWSTR SECUR32_strdupW(PCWSTR str)
 {
@@ -332,7 +270,7 @@
 
     EnterCriticalSection(&cs);
 
-    ERR("Adding %s provider\n", debugstr_w(moduleName));
+    TRACE("Adding %s provider\n", debugstr_w(moduleName));
 
     if (!providerTable)
     {
@@ -383,7 +321,7 @@
 
     EnterCriticalSection(&cs);
 
-    ERR("Will add %d packages\n",toAdd);
+    TRACE("Will add %d packages\n",toAdd);
 
     if (!packageTable)
     {
@@ -411,7 +349,7 @@
             infoA ? &infoA[i] : NULL,
             infoW ? &infoW[i] : NULL);
 
-        ERR("added: %s\n",debugstr_w(package->infoW.Name));
+        TRACE("added: %s\n",debugstr_w(package->infoW.Name));
     }
     packageTable->numPackages += toAdd;
 
@@ -431,7 +369,7 @@
          (INIT_SECURITY_INTERFACE_A)GetProcAddress(lib,
          SECURITY_ENTRYPOINT_ANSIA);
 
-        ERR("loaded %s, InitSecurityInterfaceA is %p, InitSecurityInterfaceW 
is %p\n",
+        TRACE("loaded %s, InitSecurityInterfaceA is %p, InitSecurityInterfaceW 
is %p\n",
          debugstr_w(moduleName), pInitSecurityInterfaceA,
          pInitSecurityInterfaceW);
         if (pInitSecurityInterfaceW || pInitSecurityInterfaceA)
@@ -449,17 +387,17 @@
                 fnTableW = pInitSecurityInterfaceW();
             if (fnTableW && fnTableW->EnumerateSecurityPackagesW)
             {
-                //if (fnTableW != &securityFunctionTableW)
+                if (fnTableW != &securityFunctionTableW)
                     ret = fnTableW->EnumerateSecurityPackagesW(&toAdd, &infoW);
-                //else
-                    //ERR("%s has built-in providers, skip adding\n", 
debugstr_w(moduleName));
+                else
+                    WARN("%s has built-in providers, skip adding\n", 
debugstr_w(moduleName));
             }
             else if (fnTableA && fnTableA->EnumerateSecurityPackagesA)
             {
-                //if (fnTableA != &securityFunctionTableA)
+                if (fnTableA != &securityFunctionTableA)
                     ret = fnTableA->EnumerateSecurityPackagesA(&toAdd, &infoA);
-                //else
-                    //ERR("%s has built-in providers, skip adding\n", 
debugstr_w(moduleName));
+                else
+                    WARN("%s has built-in providers, skip adding\n", 
debugstr_w(moduleName));
             }
             if (ret == SEC_E_OK && toAdd > 0 && (infoW || infoA))
             {
@@ -477,7 +415,7 @@
         return TRUE;
     }
 
-    WARN("failed to load %s\n", debugstr_w(moduleName));
+    ERR("failed to load %s\n", debugstr_w(moduleName));
     return FALSE;
 }
 

Modified: branches/sspi-bringup/reactos/dll/win32/secur32/secur32.spec
URL: 
http://svn.reactos.org/svn/reactos/branches/sspi-bringup/reactos/dll/win32/secur32/secur32.spec?rev=51686&r1=51685&r2=51686&view=diff
==============================================================================
--- branches/sspi-bringup/reactos/dll/win32/secur32/secur32.spec [iso-8859-1] 
(original)
+++ branches/sspi-bringup/reactos/dll/win32/secur32/secur32.spec [iso-8859-1] 
Thu May 12 16:53:49 2011
@@ -64,7 +64,7 @@
 @ stub SaslInitializeSecurityContextA
 @ stub SaslInitializeSecurityContextW
 @ stub SaslContextOption
-@ stub SealMessage #(ptr long ptr long)
+@ stdcall SealMessage (ptr long ptr long)
 @ stub SecCacheSspiPackages
 @ stub SecpFreeMemory
 @ stub SecpTranslateName

Modified: branches/sspi-bringup/reactos/dll/win32/secur32/sspi.c
URL: 
http://svn.reactos.org/svn/reactos/branches/sspi-bringup/reactos/dll/win32/secur32/sspi.c?rev=51686&r1=51685&r2=51686&view=diff
==============================================================================
--- branches/sspi-bringup/reactos/dll/win32/secur32/sspi.c [iso-8859-1] 
(original)
+++ branches/sspi-bringup/reactos/dll/win32/secur32/sspi.c [iso-8859-1] Thu May 
12 16:53:49 2011
@@ -9,7 +9,7 @@
 SECURITY_STATUS WINAPI ApplyControlTokenW(PCtxtHandle Handle, PSecBufferDesc 
Buffer);
 SECURITY_STATUS WINAPI ApplyControlTokenA(PCtxtHandle Handle, PSecBufferDesc 
Buffer);
 
-static SecurityFunctionTableA securityFunctionTableA =
+SecurityFunctionTableA securityFunctionTableA =
 {
     SECURITY_SUPPORT_PROVIDER_INTERFACE_VERSION,
     EnumerateSecurityPackagesA,
@@ -41,7 +41,7 @@
     NULL
 };
 
-static SecurityFunctionTableW securityFunctionTableW =
+SecurityFunctionTableW securityFunctionTableW =
 {
     SECURITY_SUPPORT_PROVIDER_INTERFACE_VERSION,
     EnumerateSecurityPackagesW,
@@ -72,6 +72,7 @@
     DecryptMessage,
     NULL
 };
+
 
 /***********************************************************************
  *             EnumerateSecurityPackagesW (SECUR32.@)
@@ -269,7 +270,6 @@
 WINAPI
 InitSecurityInterfaceW(VOID)
 {
-    ERR("InitSecurityInterfaceW() called\n");
     return &securityFunctionTableW;
 }
 
@@ -278,7 +278,6 @@
 WINAPI
 InitSecurityInterfaceA(VOID)
 {
-    ERR("InitSecurityInterfaceA() called\n");
     return &securityFunctionTableA;
 }
 

Modified: branches/sspi-bringup/reactos/dll/win32/secur32/stubs.c
URL: 
http://svn.reactos.org/svn/reactos/branches/sspi-bringup/reactos/dll/win32/secur32/stubs.c?rev=51686&r1=51685&r2=51686&view=diff
==============================================================================
--- branches/sspi-bringup/reactos/dll/win32/secur32/stubs.c [iso-8859-1] 
(original)
+++ branches/sspi-bringup/reactos/dll/win32/secur32/stubs.c [iso-8859-1] Thu 
May 12 16:53:49 2011
@@ -59,3 +59,15 @@
     UNIMPLEMENTED;
     return STATUS_UNSUCCESSFUL;
 }
+
+SECURITY_STATUS
+SEC_ENTRY
+SealMessage(
+    LSA_SEC_HANDLE ContextHandle,
+    ULONG QualityOfProtection,
+    PSecBufferDesc MessageBuffers,
+    ULONG MessageSequenceNumber)
+{
+    UNIMPLEMENTED;
+    return STATUS_UNSUCCESSFUL;
+}

Modified: branches/sspi-bringup/reactos/dll/win32/secur32/wrapper.c
URL: 
http://svn.reactos.org/svn/reactos/branches/sspi-bringup/reactos/dll/win32/secur32/wrapper.c?rev=51686&r1=51685&r2=51686&view=diff
==============================================================================
--- branches/sspi-bringup/reactos/dll/win32/secur32/wrapper.c [iso-8859-1] 
(original)
+++ branches/sspi-bringup/reactos/dll/win32/secur32/wrapper.c [iso-8859-1] Thu 
May 12 16:53:49 2011
@@ -33,7 +33,7 @@
 {
     SECURITY_STATUS ret;
 
-    TRACE("%p %p %p\n", phSec, package, realHandle);
+    TRACE("makeSecHandle %p %p %p\n", phSec, package, realHandle);
 
     if (phSec && package && realHandle)
     {
@@ -152,9 +152,9 @@
 SECURITY_STATUS WINAPI FreeCredentialsHandle(
  PCredHandle phCredential)
 {
-    SECURITY_STATUS ret;
-
-    TRACE("%p\n", phCredential);
+    SECURITY_STATUS ret = SEC_E_INVALID_HANDLE;
+
+    TRACE("FreeCredentialsHandle %p\n", phCredential);
     if (phCredential)
     {
         SecurePackage *package = (SecurePackage *)phCredential->dwUpper;
@@ -163,12 +163,9 @@
         if (package && package->provider &&
          package->provider->fnTableW.FreeCredentialsHandle)
             ret = package->provider->fnTableW.FreeCredentialsHandle(cred);
-        else
-            ret = SEC_E_INVALID_HANDLE;
         HeapFree(GetProcessHeap(), 0, cred);
     }
-    else
-        ret = SEC_E_INVALID_HANDLE;
+
     return ret;
 }
 


Reply via email to