On Windows CE, the LoadPfx
method uses Windows API functions to load the PFX file. During this process, if the PFXVerifyPassword Windows API function call returns FALSE (indicating that the password does not appear correct), the LoadPfx
method throws the "PFX password is not valid" exception.
Apparently, it's possible for this error to get reported even if the password is correct. For example, if the PFX is protected to an Active Directory principal, or if it uses some ciphers that are not yet supported by the Windows OS, the "PFX password is not valid" exception would be raised as well.
Try loading the PFX in an app using the normal (non-CF) .NET Framework - does that work? If it does, save it to another .PFX file, and try using that file in .NET CF 3.5:
using (var cert = Certificate.LoadPfx(clientCertificatePath, string.Empty))
{
cert.Save(clientCertificatePath2, CertificateFormat.Pfx, string.Empty);
}