diff --git a/c_sharp/NSSCSWrapper/NativeCalls.cs b/c_sharp/NSSCSWrapper/NativeCalls.cs index 56c2b015..dc359083 100644 --- a/c_sharp/NSSCSWrapper/NativeCalls.cs +++ b/c_sharp/NSSCSWrapper/NativeCalls.cs @@ -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; }