|
|
|
@ -360,215 +360,605 @@ namespace cryptoki { |
|
|
|
|
MechanismInfo& operator=(CK_MECHANISM_TYPE type) { |
|
|
|
|
id=type; |
|
|
|
|
switch (id) { |
|
|
|
|
#ifdef CKM_RSA_PKCS_KEY_PAIR_GEN |
|
|
|
|
case CKM_RSA_PKCS_KEY_PAIR_GEN: name="RSA_PKCS_KEY_PAIR_GEN"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_RSA_PKCS |
|
|
|
|
case CKM_RSA_PKCS: name="RSA_PKCS"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_RSA_9796 |
|
|
|
|
case CKM_RSA_9796: name="RSA_9796"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_RSA_X_509 |
|
|
|
|
case CKM_RSA_X_509: name="RSA_X_509"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_MD2_RSA_PKCS |
|
|
|
|
case CKM_MD2_RSA_PKCS: name="MD2_RSA_PKCS"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_MD5_RSA_PKCS |
|
|
|
|
case CKM_MD5_RSA_PKCS: name="MD5_RSA_PKCS"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_SHA1_RSA_PKCS |
|
|
|
|
case CKM_SHA1_RSA_PKCS: name="SHA1_RSA_PKCS"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_RIPEMD128_RSA_PKCS |
|
|
|
|
case CKM_RIPEMD128_RSA_PKCS: name="RIPEMD128_RSA_PKCS"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_RIPEMD160_RSA_PKCS |
|
|
|
|
case CKM_RIPEMD160_RSA_PKCS: name="RIPEMD160_RSA_PKCS"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_RSA_PKCS_OAEP |
|
|
|
|
case CKM_RSA_PKCS_OAEP: name="RSA_PKCS_OAEP"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_RSA_X9_31_KEY_PAIR_GEN |
|
|
|
|
case CKM_RSA_X9_31_KEY_PAIR_GEN: name="RSA_X9_31_KEY_PAIR_GEN"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_RSA_X9_31 |
|
|
|
|
case CKM_RSA_X9_31: name="RSA_X9_31"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_SHA1_RSA_X9_31 |
|
|
|
|
case CKM_SHA1_RSA_X9_31: name="SHA1_RSA_X9_31"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_RSA_PKCS_PSS |
|
|
|
|
case CKM_RSA_PKCS_PSS: name="RSA_PKCS_PSS"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_SHA1_RSA_PKCS_PSS |
|
|
|
|
case CKM_SHA1_RSA_PKCS_PSS: name="SHA1_RSA_PKCS_PSS"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_DSA_KEY_PAIR_GEN |
|
|
|
|
case CKM_DSA_KEY_PAIR_GEN: name="DSA_KEY_PAIR_GEN"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_DSA |
|
|
|
|
case CKM_DSA: name="DSA"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_DSA_SHA1 |
|
|
|
|
case CKM_DSA_SHA1: name="DSA_SHA1"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_DH_PKCS_KEY_PAIR_GEN |
|
|
|
|
case CKM_DH_PKCS_KEY_PAIR_GEN: name="DH_PKCS_KEY_PAIR_GEN"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_DH_PKCS_DERIVE |
|
|
|
|
case CKM_DH_PKCS_DERIVE: name="DH_PKCS_DERIVE"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_X9_42_DH_KEY_PAIR_GEN |
|
|
|
|
case CKM_X9_42_DH_KEY_PAIR_GEN: name="X9_42_DH_KEY_PAIR_GEN"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_X9_42_DH_DERIVE |
|
|
|
|
case CKM_X9_42_DH_DERIVE: name="X9_42_DH_DERIVE"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_X9_42_DH_HYBRID_DERIVE |
|
|
|
|
case CKM_X9_42_DH_HYBRID_DERIVE: name="X9_42_DH_HYBRID_DERIVE"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_X9_42_MQV_DERIVE |
|
|
|
|
case CKM_X9_42_MQV_DERIVE: name="X9_42_MQV_DERIVE"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_SHA256_RSA_PKCS |
|
|
|
|
case CKM_SHA256_RSA_PKCS: name="SHA256_RSA_PKCS"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_RC2_KEY_GEN |
|
|
|
|
case CKM_RC2_KEY_GEN: name="RC2_KEY_GEN"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_RC2_ECB |
|
|
|
|
case CKM_RC2_ECB: name="RC2_ECB"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_RC2_CBC |
|
|
|
|
case CKM_RC2_CBC: name="RC2_CBC"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_RC2_MAC |
|
|
|
|
case CKM_RC2_MAC: name="RC2_MAC"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_RC2_MAC_GENERAL |
|
|
|
|
case CKM_RC2_MAC_GENERAL: name="RC2_MAC_GENERAL"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_RC2_CBC_PAD |
|
|
|
|
case CKM_RC2_CBC_PAD: name="RC2_CBC_PAD"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_RC4_KEY_GEN |
|
|
|
|
case CKM_RC4_KEY_GEN: name="RC4_KEY_GEN"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_RC4 |
|
|
|
|
case CKM_RC4: name="RC4"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_DES_KEY_GEN |
|
|
|
|
case CKM_DES_KEY_GEN: name="DES_KEY_GEN"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_DES_ECB |
|
|
|
|
case CKM_DES_ECB: name="DES_ECB"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_DES_CBC |
|
|
|
|
case CKM_DES_CBC: name="DES_CBC"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_DES_MAC |
|
|
|
|
case CKM_DES_MAC: name="DES_MAC"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_DES_MAC_GENERAL |
|
|
|
|
case CKM_DES_MAC_GENERAL: name="DES_MAC_GENERAL"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_DES_CBC_PAD |
|
|
|
|
case CKM_DES_CBC_PAD: name="DES_CBC_PAD"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_DES2_KEY_GEN |
|
|
|
|
case CKM_DES2_KEY_GEN: name="DES2_KEY_GEN"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_DES3_KEY_GEN |
|
|
|
|
case CKM_DES3_KEY_GEN: name="DES3_KEY_GEN"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_DES3_ECB |
|
|
|
|
case CKM_DES3_ECB: name="DES3_ECB"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_DES3_CBC |
|
|
|
|
case CKM_DES3_CBC: name="DES3_CBC"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_DES3_MAC |
|
|
|
|
case CKM_DES3_MAC: name="DES3_MAC"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_DES3_MAC_GENERAL |
|
|
|
|
case CKM_DES3_MAC_GENERAL: name="DES3_MAC_GENERAL"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_DES3_CBC_PAD |
|
|
|
|
case CKM_DES3_CBC_PAD: name="DES3_CBC_PAD"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_CDMF_KEY_GEN |
|
|
|
|
case CKM_CDMF_KEY_GEN: name="CDMF_KEY_GEN"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_CDMF_ECB |
|
|
|
|
case CKM_CDMF_ECB: name="CDMF_ECB"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_CDMF_CBC |
|
|
|
|
case CKM_CDMF_CBC: name="CDMF_CBC"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_CDMF_MAC |
|
|
|
|
case CKM_CDMF_MAC: name="CDMF_MAC"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_CDMF_MAC_GENERAL |
|
|
|
|
case CKM_CDMF_MAC_GENERAL: name="CDMF_MAC_GENERAL"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_CDMF_CBC_PAD |
|
|
|
|
case CKM_CDMF_CBC_PAD: name="CDMF_CBC_PAD"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_MD2 |
|
|
|
|
case CKM_MD2: name="MD2"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_MD2_HMAC |
|
|
|
|
case CKM_MD2_HMAC: name="MD2_HMAC"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_MD2_HMAC_GENERAL |
|
|
|
|
case CKM_MD2_HMAC_GENERAL: name="MD2_HMAC_GENERAL"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_MD5 |
|
|
|
|
case CKM_MD5: name="MD5"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_MD5_HMAC |
|
|
|
|
case CKM_MD5_HMAC: name="MD5_HMAC"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_MD5_HMAC_GENERAL |
|
|
|
|
case CKM_MD5_HMAC_GENERAL: name="MD5_HMAC_GENERAL"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_SHA_1 |
|
|
|
|
case CKM_SHA_1: name="SHA_1"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_SHA_1_HMAC |
|
|
|
|
case CKM_SHA_1_HMAC: name="SHA_1_HMAC"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_SHA_1_HMAC_GENERAL |
|
|
|
|
case CKM_SHA_1_HMAC_GENERAL: name="SHA_1_HMAC_GENERAL"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_RIPEMD128 |
|
|
|
|
case CKM_RIPEMD128: name="RIPEMD128"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_RIPEMD128_HMAC |
|
|
|
|
case CKM_RIPEMD128_HMAC: name="RIPEMD128_HMAC"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_RIPEMD128_HMAC_GENERAL |
|
|
|
|
case CKM_RIPEMD128_HMAC_GENERAL: name="RIPEMD128_HMAC_GENERAL"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_RIPEMD160 |
|
|
|
|
case CKM_RIPEMD160: name="RIPEMD160"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_RIPEMD160_HMAC |
|
|
|
|
case CKM_RIPEMD160_HMAC: name="RIPEMD160_HMAC"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_RIPEMD160_HMAC_GENERAL |
|
|
|
|
case CKM_RIPEMD160_HMAC_GENERAL: name="RIPEMD160_HMAC_GENERAL"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_SHA256 |
|
|
|
|
case CKM_SHA256: name="SHA256"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_SHA256_HMAC |
|
|
|
|
case CKM_SHA256_HMAC: name="SHA256_HMAC"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_SHA256_HMAC_GENERAL |
|
|
|
|
case CKM_SHA256_HMAC_GENERAL: name="SHA256_HMAC_GENERAL"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_SHA384 |
|
|
|
|
case CKM_SHA384: name="SHA384"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_SHA384_HMAC |
|
|
|
|
case CKM_SHA384_HMAC: name="SHA384_HMAC"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_SHA384_HMAC_GENERAL |
|
|
|
|
case CKM_SHA384_HMAC_GENERAL: name="SHA384_HMAC_GENERAL"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_SHA512 |
|
|
|
|
case CKM_SHA512: name="SHA512"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_SHA512_HMAC |
|
|
|
|
case CKM_SHA512_HMAC: name="SHA512_HMAC"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_SHA512_HMAC_GENERAL |
|
|
|
|
case CKM_SHA512_HMAC_GENERAL: name="SHA512_HMAC_GENERAL"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_CAST_KEY_GEN |
|
|
|
|
case CKM_CAST_KEY_GEN: name="CAST_KEY_GEN"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_CAST_ECB |
|
|
|
|
case CKM_CAST_ECB: name="CAST_ECB"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_CAST_CBC |
|
|
|
|
case CKM_CAST_CBC: name="CAST_CBC"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_CAST_MAC |
|
|
|
|
case CKM_CAST_MAC: name="CAST_MAC"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_CAST_MAC_GENERAL |
|
|
|
|
case CKM_CAST_MAC_GENERAL: name="CAST_MAC_GENERAL"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_CAST_CBC_PAD |
|
|
|
|
case CKM_CAST_CBC_PAD: name="CAST_CBC_PAD"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_CAST3_KEY_GEN |
|
|
|
|
case CKM_CAST3_KEY_GEN: name="CAST3_KEY_GEN"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_CAST3_ECB |
|
|
|
|
case CKM_CAST3_ECB: name="CAST3_ECB"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_CAST3_CBC |
|
|
|
|
case CKM_CAST3_CBC: name="CAST3_CBC"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_CAST3_MAC |
|
|
|
|
case CKM_CAST3_MAC: name="CAST3_MAC"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_CAST3_MAC_GENERAL |
|
|
|
|
case CKM_CAST3_MAC_GENERAL: name="CAST3_MAC_GENERAL"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_CAST3_CBC_PAD |
|
|
|
|
case CKM_CAST3_CBC_PAD: name="CAST3_CBC_PAD"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_CAST5_KEY_GEN |
|
|
|
|
case CKM_CAST5_KEY_GEN: name="CAST5_KEY_GEN"; break; |
|
|
|
|
//case CKM_CAST128_KEY_GEN: name="CAST5_KEY_GEN or
|
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_CAST128_KEY_GEN |
|
|
|
|
//case CKM_CAST128_KEY_GEN: name="CAST5_KEY_GEN or
|
|
|
|
|
//CAST128_KEY_GEN"; break;
|
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_CAST5_ECB |
|
|
|
|
case CKM_CAST5_ECB: name="CAST5_ECB"; break; |
|
|
|
|
//case CKM_CAST128_ECB: name="CAST5_ECB or CAST128_ECB"; break;
|
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_CAST128_ECB |
|
|
|
|
//case CKM_CAST128_ECB: name="CAST5_ECB or CAST128_ECB"; break;
|
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_CAST5_CBC |
|
|
|
|
case CKM_CAST5_CBC: name="CAST5_CBC"; break; |
|
|
|
|
//case CKM_CAST128_CBC: name="CAST5_CBC or CAST128_CBC"; break;
|
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_CAST128_CBC |
|
|
|
|
//case CKM_CAST128_CBC: name="CAST5_CBC or CAST128_CBC"; break;
|
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_CAST5_MAC |
|
|
|
|
case CKM_CAST5_MAC: name="CAST5_MAC"; break; |
|
|
|
|
//case CKM_CAST128_MAC: name="CAST5_MAC or CAST128_MAC"; break;
|
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_CAST128_MAC |
|
|
|
|
//case CKM_CAST128_MAC: name="CAST5_MAC or CAST128_MAC"; break;
|
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_CAST5_MAC_GENERAL |
|
|
|
|
case CKM_CAST5_MAC_GENERAL: name="CAST5_MAC_GENERAL"; break; |
|
|
|
|
//case CKM_CAST128_MAC_GENERAL: name="CAST5_MAC_GENERAL or
|
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_CAST128_MAC_GENERAL |
|
|
|
|
//case CKM_CAST128_MAC_GENERAL: name="CAST5_MAC_GENERAL or
|
|
|
|
|
//CAST128_MAC_GENERAL"; break;
|
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_CAST5_CBC_PAD |
|
|
|
|
case CKM_CAST5_CBC_PAD: name="CAST5_CBC_PAD"; break; |
|
|
|
|
//case CKM_CAST128_CBC_PAD: name="CAST5_CBC_PAD or
|
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_CAST128_CBC_PAD |
|
|
|
|
//case CKM_CAST128_CBC_PAD: name="CAST5_CBC_PAD or
|
|
|
|
|
//CAST128_CBC_PAD"; break;
|
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_RC5_KEY_GEN |
|
|
|
|
case CKM_RC5_KEY_GEN: name="RC5_KEY_GEN"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_RC5_ECB |
|
|
|
|
case CKM_RC5_ECB: name="RC5_ECB"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_RC5_CBC |
|
|
|
|
case CKM_RC5_CBC: name="RC5_CBC"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_RC5_MAC |
|
|
|
|
case CKM_RC5_MAC: name="RC5_MAC"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_RC5_MAC_GENERAL |
|
|
|
|
case CKM_RC5_MAC_GENERAL: name="RC5_MAC_GENERAL"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_RC5_CBC_PAD |
|
|
|
|
case CKM_RC5_CBC_PAD: name="RC5_CBC_PAD"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_IDEA_KEY_GEN |
|
|
|
|
case CKM_IDEA_KEY_GEN: name="IDEA_KEY_GEN"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_IDEA_ECB |
|
|
|
|
case CKM_IDEA_ECB: name="IDEA_ECB"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_IDEA_CBC |
|
|
|
|
case CKM_IDEA_CBC: name="IDEA_CBC"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_IDEA_MAC |
|
|
|
|
case CKM_IDEA_MAC: name="IDEA_MAC"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_IDEA_MAC_GENERAL |
|
|
|
|
case CKM_IDEA_MAC_GENERAL: name="IDEA_MAC_GENERAL"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_IDEA_CBC_PAD |
|
|
|
|
case CKM_IDEA_CBC_PAD: name="IDEA_CBC_PAD"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_GENERIC_SECRET_KEY_GEN |
|
|
|
|
case CKM_GENERIC_SECRET_KEY_GEN: name="GENERIC_SECRET_KEY_GEN"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_CONCATENATE_BASE_AND_KEY |
|
|
|
|
case CKM_CONCATENATE_BASE_AND_KEY: |
|
|
|
|
name="CONCATENATE_BASE_AND_KEY"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_CONCATENATE_BASE_AND_DATA |
|
|
|
|
case CKM_CONCATENATE_BASE_AND_DATA: |
|
|
|
|
name="CONCATENATE_BASE_AND_DATA"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_CONCATENATE_DATA_AND_BASE |
|
|
|
|
case CKM_CONCATENATE_DATA_AND_BASE: |
|
|
|
|
name="CONCATENATE_DATA_AND_BASE"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_XOR_BASE_AND_DATA |
|
|
|
|
case CKM_XOR_BASE_AND_DATA: name="XOR_BASE_AND_DATA"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_EXTRACT_KEY_FROM_KEY |
|
|
|
|
case CKM_EXTRACT_KEY_FROM_KEY: name="EXTRACT_KEY_FROM_KEY"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_SSL3_PRE_MASTER_KEY_GEN |
|
|
|
|
case CKM_SSL3_PRE_MASTER_KEY_GEN: |
|
|
|
|
name="SSL3_PRE_MASTER_KEY_GEN"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_SSL3_MASTER_KEY_DERIVE |
|
|
|
|
case CKM_SSL3_MASTER_KEY_DERIVE: name="SSL3_MASTER_KEY_DERIVE"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_SSL3_KEY_AND_MAC_DERIVE |
|
|
|
|
case CKM_SSL3_KEY_AND_MAC_DERIVE: |
|
|
|
|
name="SSL3_KEY_AND_MAC_DERIVE"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_SSL3_MASTER_KEY_DERIVE_DH |
|
|
|
|
case CKM_SSL3_MASTER_KEY_DERIVE_DH: |
|
|
|
|
name="SSL3_MASTER_KEY_DERIVE_DH"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_TLS_PRE_MASTER_KEY_GEN |
|
|
|
|
case CKM_TLS_PRE_MASTER_KEY_GEN: name="TLS_PRE_MASTER_KEY_GEN"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_TLS_MASTER_KEY_DERIVE |
|
|
|
|
case CKM_TLS_MASTER_KEY_DERIVE: name="TLS_MASTER_KEY_DERIVE"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_TLS_KEY_AND_MAC_DERIVE |
|
|
|
|
case CKM_TLS_KEY_AND_MAC_DERIVE: name="TLS_KEY_AND_MAC_DERIVE"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_TLS_MASTER_KEY_DERIVE_DH |
|
|
|
|
case CKM_TLS_MASTER_KEY_DERIVE_DH: |
|
|
|
|
name="TLS_MASTER_KEY_DERIVE_DH"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_SSL3_MD5_MAC |
|
|
|
|
case CKM_SSL3_MD5_MAC: name="SSL3_MD5_MAC"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_SSL3_SHA1_MAC |
|
|
|
|
case CKM_SSL3_SHA1_MAC: name="SSL3_SHA1_MAC"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_MD5_KEY_DERIVATION |
|
|
|
|
case CKM_MD5_KEY_DERIVATION: name="MD5_KEY_DERIVATION"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_MD2_KEY_DERIVATION |
|
|
|
|
case CKM_MD2_KEY_DERIVATION: name="MD2_KEY_DERIVATION"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_SHA1_KEY_DERIVATION |
|
|
|
|
case CKM_SHA1_KEY_DERIVATION: name="SHA1_KEY_DERIVATION"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_SHA256_KEY_DERIVATION |
|
|
|
|
case CKM_SHA256_KEY_DERIVATION: name="SHA256_KEY_DERIVATION"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_PBE_MD2_DES_CBC |
|
|
|
|
case CKM_PBE_MD2_DES_CBC: name="PBE_MD2_DES_CBC"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_PBE_MD5_DES_CBC |
|
|
|
|
case CKM_PBE_MD5_DES_CBC: name="PBE_MD5_DES_CBC"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_PBE_MD5_CAST_CBC |
|
|
|
|
case CKM_PBE_MD5_CAST_CBC: name="PBE_MD5_CAST_CBC"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_PBE_MD5_CAST3_CBC |
|
|
|
|
case CKM_PBE_MD5_CAST3_CBC: name="PBE_MD5_CAST3_CBC"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_PBE_MD5_CAST5_CBC |
|
|
|
|
case CKM_PBE_MD5_CAST5_CBC: name="PBE_MD5_CAST5_CBC"; break; |
|
|
|
|
//case CKM_PBE_MD5_CAST128_CBC: name="PBE_MD5_CAST5_CBC or
|
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_PBE_MD5_CAST128_CBC |
|
|
|
|
//case CKM_PBE_MD5_CAST128_CBC: name="PBE_MD5_CAST5_CBC or
|
|
|
|
|
//PBE_MD5_CAST128_CBC"; break;
|
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_PBE_SHA1_CAST5_CBC |
|
|
|
|
case CKM_PBE_SHA1_CAST5_CBC: name="PBE_SHA1_CAST5_CBC"; break; |
|
|
|
|
//case CKM_PBE_SHA1_CAST128_CBC: name="PBE_SHA1_CAST5_CBC or
|
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_PBE_SHA1_CAST128_CBC |
|
|
|
|
//case CKM_PBE_SHA1_CAST128_CBC: name="PBE_SHA1_CAST5_CBC or
|
|
|
|
|
//PBE_SHA1_CAST128_CBC"; break;
|
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_PBE_SHA1_RC4_128 |
|
|
|
|
case CKM_PBE_SHA1_RC4_128: name="PBE_SHA1_RC4_128"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_PBE_SHA1_RC4_40 |
|
|
|
|
case CKM_PBE_SHA1_RC4_40: name="PBE_SHA1_RC4_40"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_PBE_SHA1_DES3_EDE_CBC |
|
|
|
|
case CKM_PBE_SHA1_DES3_EDE_CBC: name="PBE_SHA1_DES3_EDE_CBC"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_PBE_SHA1_DES2_EDE_CBC |
|
|
|
|
case CKM_PBE_SHA1_DES2_EDE_CBC: name="PBE_SHA1_DES2_EDE_CBC"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_PBE_SHA1_RC2_128_CBC |
|
|
|
|
case CKM_PBE_SHA1_RC2_128_CBC: name="PBE_SHA1_RC2_128_CBC"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_PBE_SHA1_RC2_40_CBC |
|
|
|
|
case CKM_PBE_SHA1_RC2_40_CBC: name="PBE_SHA1_RC2_40_CBC"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_PKCS5_PBKD2 |
|
|
|
|
case CKM_PKCS5_PBKD2: name="PKCS5_PBKD2"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_PBA_SHA1_WITH_SHA1_HMAC |
|
|
|
|
case CKM_PBA_SHA1_WITH_SHA1_HMAC: |
|
|
|
|
name="PBA_SHA1_WITH_SHA1_HMAC"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_KEY_WRAP_LYNKS |
|
|
|
|
case CKM_KEY_WRAP_LYNKS: name="KEY_WRAP_LYNKS"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_KEY_WRAP_SET_OAEP |
|
|
|
|
case CKM_KEY_WRAP_SET_OAEP: name="KEY_WRAP_SET_OAEP"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_SKIPJACK_KEY_GEN |
|
|
|
|
case CKM_SKIPJACK_KEY_GEN: name="SKIPJACK_KEY_GEN"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_SKIPJACK_ECB64 |
|
|
|
|
case CKM_SKIPJACK_ECB64: name="SKIPJACK_ECB64"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_SKIPJACK_CBC64 |
|
|
|
|
case CKM_SKIPJACK_CBC64: name="SKIPJACK_CBC64"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_SKIPJACK_OFB64 |
|
|
|
|
case CKM_SKIPJACK_OFB64: name="SKIPJACK_OFB64"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_SKIPJACK_CFB64 |
|
|
|
|
case CKM_SKIPJACK_CFB64: name="SKIPJACK_CFB64"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_SKIPJACK_CFB32 |
|
|
|
|
case CKM_SKIPJACK_CFB32: name="SKIPJACK_CFB32"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_SKIPJACK_CFB16 |
|
|
|
|
case CKM_SKIPJACK_CFB16: name="SKIPJACK_CFB16"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_SKIPJACK_CFB8 |
|
|
|
|
case CKM_SKIPJACK_CFB8: name="SKIPJACK_CFB8"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_SKIPJACK_WRAP |
|
|
|
|
case CKM_SKIPJACK_WRAP: name="SKIPJACK_WRAP"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_SKIPJACK_PRIVATE_WRAP |
|
|
|
|
case CKM_SKIPJACK_PRIVATE_WRAP: name="SKIPJACK_PRIVATE_WRAP"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_SKIPJACK_RELAYX |
|
|
|
|
case CKM_SKIPJACK_RELAYX: name="SKIPJACK_RELAYX"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_KEA_KEY_PAIR_GEN |
|
|
|
|
case CKM_KEA_KEY_PAIR_GEN: name="KEA_KEY_PAIR_GEN"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_KEA_KEY_DERIVE |
|
|
|
|
case CKM_KEA_KEY_DERIVE: name="KEA_KEY_DERIVE"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_FORTEZZA_TIMESTAMP |
|
|
|
|
case CKM_FORTEZZA_TIMESTAMP: name="FORTEZZA_TIMESTAMP"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_BATON_KEY_GEN |
|
|
|
|
case CKM_BATON_KEY_GEN: name="BATON_KEY_GEN"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_BATON_ECB128 |
|
|
|
|
case CKM_BATON_ECB128: name="BATON_ECB128"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_BATON_ECB96 |
|
|
|
|
case CKM_BATON_ECB96: name="BATON_ECB96"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_BATON_CBC128 |
|
|
|
|
case CKM_BATON_CBC128: name="BATON_CBC128"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_BATON_COUNTER |
|
|
|
|
case CKM_BATON_COUNTER: name="BATON_COUNTER"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_BATON_SHUFFLE |
|
|
|
|
case CKM_BATON_SHUFFLE: name="BATON_SHUFFLE"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_BATON_WRAP |
|
|
|
|
case CKM_BATON_WRAP: name="BATON_WRAP"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_ECDSA_KEY_PAIR_GEN |
|
|
|
|
case CKM_ECDSA_KEY_PAIR_GEN: name="ECDSA_KEY_PAIR_GEN"; break; |
|
|
|
|
//case CKM_EC_KEY_PAIR_GEN: name="ECDSA_KEY_PAIR_GEN or
|
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_EC_KEY_PAIR_GEN |
|
|
|
|
//case CKM_EC_KEY_PAIR_GEN: name="ECDSA_KEY_PAIR_GEN or
|
|
|
|
|
//EC_KEY_PAIR_GEN"; break;
|
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_ECDSA |
|
|
|
|
case CKM_ECDSA: name="ECDSA"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_ECDSA_SHA1 |
|
|
|
|
case CKM_ECDSA_SHA1: name="ECDSA_SHA1"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_ECDH1_DERIVE |
|
|
|
|
case CKM_ECDH1_DERIVE: name="ECDH1_DERIVE"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_ECDH1_COFACTOR_DERIVE |
|
|
|
|
case CKM_ECDH1_COFACTOR_DERIVE: name="ECDH1_COFACTOR_DERIVE"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_ECMQV_DERIVE |
|
|
|
|
case CKM_ECMQV_DERIVE: name="ECMQV_DERIVE"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_JUNIPER_KEY_GEN |
|
|
|
|
case CKM_JUNIPER_KEY_GEN: name="JUNIPER_KEY_GEN"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_JUNIPER_ECB128 |
|
|
|
|
case CKM_JUNIPER_ECB128: name="JUNIPER_ECB128"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_JUNIPER_CBC128 |
|
|
|
|
case CKM_JUNIPER_CBC128: name="JUNIPER_CBC128"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_JUNIPER_COUNTER |
|
|
|
|
case CKM_JUNIPER_COUNTER: name="JUNIPER_COUNTER"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_JUNIPER_SHUFFLE |
|
|
|
|
case CKM_JUNIPER_SHUFFLE: name="JUNIPER_SHUFFLE"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_JUNIPER_WRAP |
|
|
|
|
case CKM_JUNIPER_WRAP: name="JUNIPER_WRAP"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_FASTHASH |
|
|
|
|
case CKM_FASTHASH: name="FASTHASH"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_AES_KEY_GEN |
|
|
|
|
case CKM_AES_KEY_GEN: name="AES_KEY_GEN"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_AES_ECB |
|
|
|
|
case CKM_AES_ECB: name="AES_ECB"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_AES_CBC |
|
|
|
|
case CKM_AES_CBC: name="AES_CBC"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_AES_MAC |
|
|
|
|
case CKM_AES_MAC: name="AES_MAC"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_AES_MAC_GENERAL |
|
|
|
|
case CKM_AES_MAC_GENERAL: name="AES_MAC_GENERAL"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_AES_CBC_PAD |
|
|
|
|
case CKM_AES_CBC_PAD: name="AES_CBC_PAD"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_DSA_PARAMETER_GEN |
|
|
|
|
case CKM_DSA_PARAMETER_GEN: name="DSA_PARAMETER_GEN"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_DH_PKCS_PARAMETER_GEN |
|
|
|
|
case CKM_DH_PKCS_PARAMETER_GEN: name="DH_PKCS_PARAMETER_GEN"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_X9_42_DH_PARAMETER_GEN |
|
|
|
|
case CKM_X9_42_DH_PARAMETER_GEN: name="X9_42_DH_PARAMETER_GEN"; break; |
|
|
|
|
#endif |
|
|
|
|
#ifdef CKM_VENDOR_DEFINED |
|
|
|
|
case CKM_VENDOR_DEFINED: name="VENDOR_DEFINED"; break; |
|
|
|
|
#endif |
|
|
|
|
default: { |
|
|
|
|
std::stringstream ss; |
|
|
|
|
ss<<id; |
|
|
|
|