Added the capability of configuring the ATS Address, port, and whether or not SSL should be used for communications.

This commit is contained in:
Juan Carlos Luciani
2006-09-22 16:24:03 +00:00
parent 6e12d33817
commit 637726123c
7 changed files with 171 additions and 51 deletions

View File

@@ -29,6 +29,9 @@
#include <shlwapi.h>
//===[ External data ]=====================================================
extern
char clientConfigFolderPartialPath[];
extern
char mechConfigFolderPartialPath[];
@@ -54,6 +57,7 @@ BOOL APIENTRY DllMain(
//=======================================================================--
{
BOOL retStatus = TRUE;
char programFilesFolder[MAX_PATH];
switch (ul_reason_for_call)
{
@@ -61,13 +65,17 @@ BOOL APIENTRY DllMain(
{
g_hModule = hModule;
// Setup the path to the auth mechanisms config folder
// Setup the path to the client and auth mechanisms config folders
if (SHGetFolderPath(NULL,
CSIDL_PROGRAM_FILES,
NULL,
0,
mechConfigFolder) == 0)
programFilesFolder) == 0)
{
strcpy(clientConfigFolder, programFilesFolder);
PathAppend(clientConfigFolder, clientConfigFolderPartialPath);
strcpy(mechConfigFolder, programFilesFolder);
PathAppend(mechConfigFolder, mechConfigFolderPartialPath);
// Initialize the library

View File

@@ -53,6 +53,10 @@ LIST_ENTRY normalizedHostNameCacheListHead;
static
HANDLE hNormalizedHostNameCacheMutex;
// Client configuration file folder
char clientConfigFolder[MAX_PATH];
char clientConfigFolderPartialPath[] = "Novell\\Casa\\Etc\\Auth";
// Authentication mechanism configuration file folder
char mechConfigFolder[MAX_PATH];
char mechConfigFolderPartialPath[] = "Novell\\Casa\\Etc\\Auth\\Mechanisms";

View File

@@ -38,7 +38,6 @@
//===[ Global variables ]==================================================
//++=======================================================================
static
CasaStatus
@@ -62,7 +61,6 @@ CopyMultiToWideAlloc(
int retStatus;
int size, i;
DbgTrace(2, "-CopyMultiToWideAlloc- Start\n", 0);
size = (multiSize + 1) * sizeof(WCHAR);
@@ -99,7 +97,8 @@ CopyMultiToWideAlloc(
//++=======================================================================
RpcSession*
OpenRpcSession(
IN char *pHostName)
IN char *pHostName,
IN uint16_t hostPort)
//
// Arguments:
//
@@ -114,7 +113,6 @@ OpenRpcSession(
{
RpcSession *pSession;
DbgTrace(1, "-OpenRpcSession- Start\n", 0);
// Allocate space for the session
@@ -145,7 +143,7 @@ OpenRpcSession(
// Now open connection
pSession->hConnection = WinHttpConnect(pSession->hSession,
pWideHostName,
8080, /*INTERNET_DEFAULT_HTTP_PORT,*/
hostPort,
0);
if (pSession->hConnection == NULL)
{