* The "CRYPT_IPSEC_HMAC_KEY" is required to allow RC2 keys longer than
* 16 byte. Again, this is documented on the "CryptImportKey" page as a
* side note. */
- status = CryptImportKey (hProv, (BYTE *) data, sizeof (data),
+ status = CryptImportKey (hProv, (BYTE *) data,
+ /* dwDataLen = */ sizeof (*data) + data->key_size,
/* public key = */ 0,
/* flags = */ CRYPT_IPSEC_HMAC_KEY,
&ret_key);