summaryrefslogtreecommitdiff
path: root/src/ne_sspi.c
diff options
context:
space:
mode:
authorjoe <joe@61a7d7f5-40b7-0310-9c16-bb0ea8cb1845>2005-01-27 20:03:53 +0000
committerjoe <joe@61a7d7f5-40b7-0310-9c16-bb0ea8cb1845>2005-01-27 20:03:53 +0000
commit8d43bdb4bf07c087feb2829acf959842cfbacce1 (patch)
tree13adbcd7994a57efde42b5d7415c37437c71f4dd /src/ne_sspi.c
parent69cb1d083a05ca5f2b581132123293d26d450eb8 (diff)
downloadneon-8d43bdb4bf07c087feb2829acf959842cfbacce1.tar.gz
Fix SSPI code so that it compiles for Win32 (Vladimir):
* src/ne_sspi.h (ne_sspi_deinit): fixed return type. * src/ne_sspi.c: Added preprocessor check HAVE_SSPI to allow compilation without SSPI. (getMaxTokenSize): removed const qualifier for package parameter because it has to be passed to a function that takes a not const reference. (ne_sspi_init, ne_sspi_deinit): Match the function names to the correct functions. git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@457 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
Diffstat (limited to 'src/ne_sspi.c')
-rw-r--r--src/ne_sspi.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/ne_sspi.c b/src/ne_sspi.c
index 4fc4e90..d530112 100644
--- a/src/ne_sspi.c
+++ b/src/ne_sspi.c
@@ -25,6 +25,8 @@
#include "ne_string.h"
#include "ne_sspi.h"
+#ifdef HAVE_SSPI
+
#define SEC_SUCCESS(Status) ((Status) >= 0)
struct SSPIContextStruct {
@@ -48,7 +50,7 @@ static int initialized = 0;
/*
* Query specified package for it's maximum token size.
*/
-static int getMaxTokenSize(const char *package, ULONG * maxTokenSize)
+static int getMaxTokenSize(char *package, ULONG * maxTokenSize)
{
SECURITY_STATUS status;
SecPkgInfo *packageSecurityInfo = NULL;
@@ -116,9 +118,8 @@ static void initDll(HINSTANCE hSecDll)
/*
* This function needs to be called at least once before using any other.
*/
-int sspiInit()
+int ne_sspi_init(void)
{
-
if (initialized) {
return 0;
}
@@ -148,7 +149,7 @@ int sspiInit()
/*
* This function can be called to free resources used by SSPI.
*/
-int ne_sspi_init(void)
+int ne_sspi_deinit(void)
{
NE_DEBUG(NE_DBG_SOCKET, "sspi: DeInit\n");
if (initialized <= 0) {
@@ -544,3 +545,4 @@ int ne_sspi_authenticate(void *context, const char *base64Token, char **response
return 0;
}
+#endif /* HAVE_SSPI */