Yuval Fledel : schannel: Implement SpUserModeInitialize.

Alexandre Julliard julliard at wine.codeweavers.com
Fri Apr 27 06:43:49 CDT 2007


Module: wine
Branch: master
Commit: cdb91ab7eea33d07633e732ccfa36dbf38b8cab1
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=cdb91ab7eea33d07633e732ccfa36dbf38b8cab1

Author: Yuval Fledel <yuvalfl at gmail.com>
Date:   Wed Apr 25 22:47:32 2007 +0300

schannel: Implement SpUserModeInitialize.

---

 dlls/schannel/Makefile.in   |    3 +-
 dlls/schannel/schannel.spec |    2 +-
 dlls/schannel/usermode.c    |   85 +++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 88 insertions(+), 2 deletions(-)

diff --git a/dlls/schannel/Makefile.in b/dlls/schannel/Makefile.in
index e0de3b3..3cf48ef 100644
--- a/dlls/schannel/Makefile.in
+++ b/dlls/schannel/Makefile.in
@@ -7,7 +7,8 @@ IMPORTS   = secur32 kernel32
 
 C_SRCS = \
 	lsamode.c \
-	schannel_main.c
+	schannel_main.c \
+	usermode.c
 
 @MAKE_DLL_RULES@
 
diff --git a/dlls/schannel/schannel.spec b/dlls/schannel/schannel.spec
index 5c38050..c330c83 100644
--- a/dlls/schannel/schannel.spec
+++ b/dlls/schannel/schannel.spec
@@ -24,7 +24,7 @@
 @ stdcall RevertSecurityContext(ptr) secur32.RevertSecurityContext
 @ stdcall SealMessage(ptr long ptr long) secur32.SealMessage
 @ stdcall SpLsaModeInitialize(long ptr ptr ptr)
-@ stub SpUserModeInitialize
+@ stdcall SpUserModeInitialize(long ptr ptr ptr)
 @ stub SslCrackCertificate
 @ stub SslEmptyCacheA
 @ stub SslEmptyCacheW
diff --git a/dlls/schannel/usermode.c b/dlls/schannel/usermode.c
new file mode 100644
index 0000000..0713f82
--- /dev/null
+++ b/dlls/schannel/usermode.c
@@ -0,0 +1,85 @@
+/*
+ * User-mode functions of the SChannel security provider
+ *
+ * Copyright 2007 Yuval Fledel
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include <stdarg.h>
+
+#include "ntstatus.h"
+#define WIN32_NO_STATUS
+#include "windef.h"
+#include "winbase.h"
+#include "sspi.h"
+#include "ntsecapi.h"
+#include "ntsecpkg.h"
+
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(schannel);
+
+static SECPKG_USER_FUNCTION_TABLE secPkgUserTables[2] =
+{ {
+    NULL, /* InstanceInit */
+    NULL, /* InitUserModeContext */
+    NULL, /* MakeSignature */
+    NULL, /* VerifySignature */
+    NULL, /* SealMessage */
+    NULL, /* UnsealMessage */
+    NULL, /* GetContextToken */
+    NULL, /* SpQueryContextAttributes */
+    NULL, /* CompleteAuthToken */
+    NULL, /* DeleteUserModeContext */
+    NULL, /* FormatCredentials */
+    NULL, /* MarshallSupplementalCreds */
+    NULL, /* ExportContext */
+    NULL, /* ImportContext */
+  }, {
+    NULL, /* InstanceInit */
+    NULL, /* InitUserModeContext */
+    NULL, /* MakeSignature */
+    NULL, /* VerifySignature */
+    NULL, /* SealMessage */
+    NULL, /* UnsealMessage */
+    NULL, /* GetContextToken */
+    NULL, /* SpQueryContextAttributes */
+    NULL, /* CompleteAuthToken */
+    NULL, /* DeleteUserModeContext */
+    NULL, /* FormatCredentials */
+    NULL, /* MarshallSupplementalCreds */
+    NULL, /* ExportContext */
+    NULL, /* ImportContext */
+  }
+};
+
+/***********************************************************************
+ *              SpUserModeInitialize (SCHANNEL.@)
+ */
+NTSTATUS WINAPI SpUserModeInitialize(ULONG LsaVersion, PULONG PackageVersion,
+  PSECPKG_USER_FUNCTION_TABLE *ppTables, PULONG pcTables)
+{
+    TRACE("(%u, %p, %p, %p)\n", LsaVersion, PackageVersion, ppTables, pcTables);
+
+    if (LsaVersion != SECPKG_INTERFACE_VERSION)
+        return STATUS_INVALID_PARAMETER;
+
+    *PackageVersion = SECPKG_INTERFACE_VERSION;
+    *pcTables = 2;
+    *ppTables = secPkgUserTables;
+
+    return STATUS_SUCCESS;
+}




More information about the wine-cvs mailing list