Microsoft KB Archive/840784

= You may receive the &quot;The keyset is not defined&quot; error message when the provider name of a CSP contains extended characters =

Article ID: 840784

Article Last Modified on 11/27/2007

-

APPLIES TO


 * Microsoft Windows XP Professional
 * Microsoft Windows XP Embedded

-



SYMPTOMS
If you try to establish a virtual private network (VPN) connection by using a smart card where the provider name of a custom Cryptographic Service Provider (CSP) contains extended characters, you may receive the following error message:

Error 0x80090019: The keyset is not defined



CAUSE
This behavior is caused when the provider name of the CSP is converted to Unicode characters by using the MultiByteToWideChar function that is present in the kernel32.dll file. The extended characters in the provider name may be lost during this conversion, and the provider name is converted incorrectly.



RESOLUTION
Make sure that the name of the CSP contains only ASCII characters.



STATUS
This behavior is by design.



MORE INFORMATION
Generally, the MultiByteToWideChar function accepts CP_UTF8 as an input format. The CPGetProvParam function returns the data about the CSP that is passed to the MultiByteToWideChar function. When the CPGetProvParam function returns a format other than CP_UTF8, the returned provider name is incorrectly converted.

The Microsoft Crypto API does not support Unicode very well. Also, there is no mechanism to return the code page that the CSP uses. Therefore, the behavior of the CPGetProvParam function may be inconsistent when it is used.

