Made changes to deal with issues found during self-code review.

Added lock callback functionality for interfacing with OpenSSL
in a multi-threaded environment.
This commit is contained in:
Juan Carlos Luciani
2006-11-30 18:21:42 +00:00
parent a522f9d982
commit 1974ee9875
28 changed files with 1196 additions and 548 deletions

View File

@@ -7,6 +7,27 @@
# #
#######################################################
#
# LibraryName setting.
#
# Description: Used to specify the path to the library
# implementing the authentication mechanism.
#
LibraryName /usr/lib/CASA/authtoken/krb5mech.so
#
# DebugLevel setting.
#
# Description: Used to specify the level of logging utilized for debugging
# purposes. A level of zero being the lowest debugging level.
#
# If this parameter is not set, the client defaults
# to use a debug level of zero.
#
# Note: Debug statements can be viewed under Windows by using
# tools such as DbgView. Under Linux, debug statements are logged
# to /var/log/messages.
#
#DebugLevel 0

View File

@@ -7,6 +7,26 @@
# #
#######################################################
#
# LibraryName setting.
#
# Description: Used to specify the path to the library
# implementing the authentication mechanism.
#
LibraryName /usr/lib64/CASA/authtoken/krb5mech.so
#
# DebugLevel setting.
#
# Description: Used to specify the level of logging utilized for debugging
# purposes. A level of zero being the lowest debugging level.
#
# If this parameter is not set, the client defaults
# to use a debug level of zero.
#
# Note: Debug statements can be viewed under Windows by using
# tools such as DbgView. Under Linux, debug statements are logged
# to /var/log/messages.
#
#DebugLevel 0

View File

@@ -75,8 +75,11 @@ LogGssStatuses(
}
// Trace this message
DbgTrace(0, "-LogGssStatuses- GSS-API error %s: ", operation);
DbgTrace(0, "%s\n", (char *)msg.value);
if (msg.value != NULL)
{
DbgTrace(0, "-LogGssStatuses- GSS-API error %s: ", operation);
DbgTrace(0, "%s\n", (char *)msg.value);
}
if (msg.length != 0)
gss_release_buffer(&gssMinStat, &msg);
@@ -102,8 +105,11 @@ LogGssStatuses(
}
// Trace this message
DbgTrace(0, "-LogGssStatuses- GSS-API error %s: ", operation);
DbgTrace(0, "%s\n", (char *)msg.value);
if (msg.value != NULL)
{
DbgTrace(0, "-LogGssStatuses- GSS-API error %s: ", operation);
DbgTrace(0, "%s\n", (char *)msg.value);
}
if (msg.length != 0)
gss_release_buffer(&gssMinStat, &msg);
@@ -226,7 +232,7 @@ AuthTokenIf_GetAuthToken(
gssBuffer.length = strlen(pKrbServiceName) + 1;
if (strchr(pKrbServiceName, '@') != NULL)
{
// The name is of the form "servicename@hostname"
// The name is of the form "servicename@realmname"
gssMajStat = gss_import_name(&gssMinStat,
&gssBuffer,
(gss_OID) GSS_C_NT_HOSTBASED_SERVICE,
@@ -290,7 +296,7 @@ AuthTokenIf_GetAuthToken(
else
{
// The buffer provided is large enough, copy the data and return the actual size.
memcpy((void*) pTokenBuf, pEncodedToken, encodedTokenLen +1);
memcpy((void*) pTokenBuf, pEncodedToken, encodedTokenLen + 1);
// Success
retStatus = CASA_STATUS_SUCCESS;