diff --git a/CASA/sharp/NSSCSWrapper/NativeCalls.cs b/CASA/sharp/NSSCSWrapper/NativeCalls.cs index d7e16070..66ccba7d 100644 --- a/CASA/sharp/NSSCSWrapper/NativeCalls.cs +++ b/CASA/sharp/NSSCSWrapper/NativeCalls.cs @@ -929,12 +929,11 @@ namespace Novell.CASA SSCS_KEYCHAIN_ID_T keyChainID = new SSCS_KEYCHAIN_ID_T(); keyChainID.keychainID = sKeyChainID; - keyChainID.len = sKeyChainID.Length + 1; - - SSCS_PASSWORD_T epPassword = null; - if (sEPPassword != null) - { - epPassword = new SSCS_PASSWORD_T(); + keyChainID.len = sKeyChainID.Length + 1; + + SSCS_PASSWORD_T epPassword = new SSCS_PASSWORD_T(); + if (sEPPassword != null && sEPPassword.Length > 0) + { epPassword.pword = sEPPassword; epPassword.pwordLen = (uint)sEPPassword.Length + 1; epPassword.pwordType = 0; // todo set type @@ -954,8 +953,8 @@ namespace Novell.CASA keyChainID, ssFlags, secretID, - null, // EPPassword is not used. Fix this if/when it is. - null); + epPassword, // EPPassword is not used. Fix this if/when it is. + ext); return rcode;