Commit 04c6862d authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

secur32: Build with msvcrt.

parent 7d0889b7
......@@ -5,6 +5,8 @@ DELAYIMPORTS = crypt32
EXTRAINCL = $(GNUTLS_CFLAGS)
EXTRALIBS = $(SECURITY_LIBS) $(PTHREAD_LIBS)
EXTRADLLFLAGS = -mno-cygwin
C_SRCS = \
lsa.c \
negotiate.c \
......
......@@ -23,10 +23,9 @@
#include "sspi.h"
#include "rpc.h"
#include "wincred.h"
#include "secur32_priv.h"
#include "wine/debug.h"
#include "wine/unicode.h"
#include "secur32_priv.h"
WINE_DEFAULT_DEBUG_CHANNEL(secur32);
......
......@@ -25,15 +25,15 @@
#define NONAMELESSUNION
#include "windef.h"
#include "winbase.h"
#include "winternl.h"
#include "winreg.h"
#include "winnls.h"
#include "lmcons.h"
#include "sspi.h"
#include "schannel.h"
#include "secur32_priv.h"
#include "wine/unicode.h"
#include "wine/debug.h"
#include "secur32_priv.h"
WINE_DEFAULT_DEBUG_CHANNEL(secur32);
......@@ -199,8 +199,8 @@ static void read_config(void)
DWORD type, size, value;
for(i = 0; i < ARRAY_SIZE(protocol_config_keys); i++) {
strcpyW(subkey_name, protocol_config_keys[i].key_name);
strcatW(subkey_name, clientW);
wcscpy(subkey_name, protocol_config_keys[i].key_name);
wcscat(subkey_name, clientW);
res = RegOpenKeyExW(protocols_key, subkey_name, 0, KEY_READ, &key);
if(res != ERROR_SUCCESS) {
if(protocol_config_keys[i].enabled)
......@@ -412,8 +412,8 @@ static WCHAR *get_key_container_path(const CERT_CONTEXT *ctx)
RtlFreeHeap(GetProcessHeap(), 0, str);
return NULL;
}
strcpyW(ret, rsabaseW);
MultiByteToWideChar(CP_ACP, 0, str, -1, ret + strlenW(ret), len);
wcscpy(ret, rsabaseW);
MultiByteToWideChar(CP_ACP, 0, str, -1, ret + wcslen(ret), len);
RtlFreeHeap(GetProcessHeap(), 0, str);
}
else if (CertGetCertificateContextProperty(ctx, CERT_KEY_PROV_INFO_PROP_ID, NULL, &prov_size))
......@@ -425,21 +425,21 @@ static WCHAR *get_key_container_path(const CERT_CONTEXT *ctx)
return NULL;
}
if (!(ret = RtlAllocateHeap(GetProcessHeap(), 0,
sizeof(rsabaseW) + strlenW(prov->pwszContainerName) * sizeof(WCHAR))))
sizeof(rsabaseW) + wcslen(prov->pwszContainerName) * sizeof(WCHAR))))
{
RtlFreeHeap(GetProcessHeap(), 0, prov);
return NULL;
}
strcpyW(ret, rsabaseW);
strcatW(ret, prov->pwszContainerName);
wcscpy(ret, rsabaseW);
wcscat(ret, prov->pwszContainerName);
RtlFreeHeap(GetProcessHeap(), 0, prov);
}
if (!ret && GetUserNameW(username, &len) && (ret = RtlAllocateHeap(GetProcessHeap(), 0,
sizeof(rsabaseW) + len * sizeof(WCHAR))))
{
strcpyW(ret, rsabaseW);
strcatW(ret, username);
wcscpy(ret, rsabaseW);
wcscat(ret, username);
}
return ret;
......
......@@ -16,6 +16,7 @@
* 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 <assert.h>
#include <stdarg.h>
......@@ -28,7 +29,6 @@
#include "winternl.h"
#include "shlwapi.h"
#include "sspi.h"
#include "secur32_priv.h"
#include "secext.h"
#include "ntsecapi.h"
#include "thunks.h"
......@@ -36,7 +36,7 @@
#include "wine/list.h"
#include "wine/debug.h"
#include "wine/unicode.h"
#include "secur32_priv.h"
WINE_DEFAULT_DEBUG_CHANNEL(secur32);
......@@ -174,18 +174,10 @@ PSecurityFunctionTableW WINAPI InitSecurityInterfaceW(void)
return &securityFunctionTableW;
}
static PWSTR SECUR32_strdupW(PCWSTR str)
static WCHAR *SECUR32_strdupW(const WCHAR *str)
{
PWSTR ret;
if (str)
{
ret = heap_alloc((lstrlenW(str) + 1) * sizeof(WCHAR));
if (ret)
lstrcpyW(ret, str);
}
else
ret = NULL;
WCHAR *ret = NULL;
if (str && (ret = heap_alloc((wcslen(str) + 1) * sizeof(WCHAR)))) wcscpy(ret, str);
return ret;
}
......@@ -595,7 +587,7 @@ static void SECUR32_initializeProviders(void)
;
if (*comma == ',')
*comma = '\0';
for (; *ptr && isspaceW(*ptr) && ptr < securityPkgNames + size;
for (; *ptr && iswspace(*ptr) && ptr < securityPkgNames + size;
ptr++)
;
if (*ptr)
......@@ -1046,16 +1038,16 @@ BOOLEAN WINAPI GetComputerObjectNameW(
break;
}
len = strlenW(cnW) + size + 1 + strlenW(ComputersW) + 1 + strlenW(dcW);
len = wcslen(cnW) + size + 1 + wcslen(ComputersW) + 1 + wcslen(dcW);
if (domainInfo->DnsDomainName.Buffer)
{
suffix = strrchrW(domainInfo->DnsDomainName.Buffer, '.');
suffix = wcsrchr(domainInfo->DnsDomainName.Buffer, '.');
if (suffix)
{
*suffix++ = 0;
len += 1 + strlenW(dcW) + strlenW(suffix);
len += 1 + wcslen(dcW) + wcslen(suffix);
}
len += strlenW(domainInfo->DnsDomainName.Buffer);
len += wcslen(domainInfo->DnsDomainName.Buffer);
}
else
suffix = NULL;
......
......@@ -17,16 +17,17 @@
* 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 "windef.h"
#include "winbase.h"
#include "winnls.h"
#include "winternl.h"
#include "sspi.h"
#include "secur32_priv.h"
#include "thunks.h"
#include "wine/debug.h"
#include "secur32_priv.h"
#include "thunks.h"
WINE_DEFAULT_DEBUG_CHANNEL(secur32);
......
......@@ -16,14 +16,15 @@
* 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 "windef.h"
#include "winbase.h"
#include "winnls.h"
#include "sspi.h"
#include "secur32_priv.h"
#include "wine/debug.h"
#include "secur32_priv.h"
WINE_DEFAULT_DEBUG_CHANNEL(secur32);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment