Add 1 to the length of IDs to comply with native code.
This commit is contained in:
parent
5f4ac7abec
commit
26a428ce26
@ -1075,12 +1075,12 @@ namespace Novell.CASA
|
||||
|
||||
SSCS_SECRET_ID_T appSecretID = new SSCS_SECRET_ID_T();
|
||||
appSecretID.id = sAppSecretID;
|
||||
appSecretID.len = sAppSecretID.Length;
|
||||
appSecretID.len = sAppSecretID.Length + 1;
|
||||
|
||||
SSCS_SECRET_ID_T sharedID = new SSCS_SECRET_ID_T();
|
||||
if (sSharedSecretID != null)
|
||||
{
|
||||
sharedID.len = sSharedSecretID.Length;
|
||||
sharedID.len = sSharedSecretID.Length + 1;
|
||||
sharedID.id = sSharedSecretID;
|
||||
|
||||
}
|
||||
@ -1146,22 +1146,22 @@ namespace Novell.CASA
|
||||
|
||||
SSCS_SECRET_ID_T appSecretID = new SSCS_SECRET_ID_T();
|
||||
appSecretID.id = sAppSecretID;
|
||||
appSecretID.len = sAppSecretID.Length;
|
||||
appSecretID.len = sAppSecretID.Length + 1;
|
||||
|
||||
SSCS_SECRET_ID_T sharedID = new SSCS_SECRET_ID_T();
|
||||
if (sSharedSecretID != null)
|
||||
{
|
||||
sharedID.len = sSharedSecretID.Length;
|
||||
sharedID.len = sSharedSecretID.Length + 1;
|
||||
sharedID.id = sSharedSecretID;
|
||||
}
|
||||
|
||||
SSCS_BASIC_CREDENTIAL_UTF8 credential = new SSCS_BASIC_CREDENTIAL_UTF8();
|
||||
credential.unFlags = unFlag;
|
||||
|
||||
credential.unLen = GetUTF8ByteCount(sUsername);
|
||||
credential.unLen = GetUTF8ByteCount(sUsername) + 1;
|
||||
credential.username = GetUTF8FromString(sUsername, USERNAME_LEN);
|
||||
|
||||
credential.pwordLen = GetUTF8ByteCount(sPassword);
|
||||
credential.pwordLen = GetUTF8ByteCount(sPassword) + 1;
|
||||
credential.password = GetUTF8FromString(sPassword, PASSWORD_LEN);
|
||||
|
||||
IntPtr pCredential = Marshal.AllocHGlobal(Marshal.SizeOf(credential));
|
||||
@ -1196,12 +1196,12 @@ namespace Novell.CASA
|
||||
int rcode;
|
||||
SSCS_SECRET_ID_T appSecretID = new SSCS_SECRET_ID_T();
|
||||
appSecretID.id = sAppSecretID;
|
||||
appSecretID.len = sAppSecretID.Length;
|
||||
appSecretID.len = sAppSecretID.Length + 1;
|
||||
|
||||
SSCS_SECRET_ID_T sharedID = new SSCS_SECRET_ID_T();
|
||||
if (sSharedSecretID != null)
|
||||
{
|
||||
sharedID.len = sSharedSecretID.Length;
|
||||
sharedID.len = sSharedSecretID.Length + 1;
|
||||
sharedID.id = sSharedSecretID;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user