CVS MCardPlugin/src
CVS User corcoran-guest
ludovic.rousseau@free.fr
Fri, 17 Sep 2004 10:56:23 -0600
Update of /cvsroot/muscleplugins/MCardPlugin/src
In directory haydn:/tmp/cvs-serv19570
Modified Files:
musclecardApplet.c
Log Message:
Added keyPolicies to ListKeys
--- /cvsroot/muscleplugins/MCardPlugin/src/musclecardApplet.c 2003/08/27 11:49:28 1.41
+++ /cvsroot/muscleplugins/MCardPlugin/src/musclecardApplet.c 2004/09/17 16:56:23 1.42
@@ -11,7 +11,7 @@
Purpose: This abstracts the Card Edge Interface APDU's
into client side function calls.
-$Id: musclecardApplet.c,v 1.41 2003/08/27 11:49:28 rousseau Exp $
+$Id: musclecardApplet.c,v 1.42 2004/09/17 16:56:23 corcoran-guest Exp $
********************************************************************/
#ifdef WIN32
#include "../win32/MCardPlugin.h"
@@ -1056,6 +1056,28 @@
currentPointer += MSC_SIZEOF_ACLVALUE;
+ switch(pKeyInfo->keyType)
+ {
+ case MSC_KEY_RSA_PUBLIC:
+ case MSC_KEY_RSA_PRIVATE:
+ case MSC_KEY_RSA_PRIVATE_CRT:
+ pKeyInfo->keyPolicy.cipherMode = MSC_KEYPOLICY_MODE_RSA_NOPAD;
+ pKeyInfo->keyPolicy.cipherDirection = MSC_KEYPOLICY_DIR_SIGN | MSC_KEYPOLICY_DIR_VERIFY |
+ MSC_KEYPOLICY_DIR_ENCRYPT | MSC_KEYPOLICY_DIR_DECRYPT;
+ break;
+ case MSC_KEY_DES:
+ case MSC_KEY_3DES:
+ case MSC_KEY_3DES3:
+ pKeyInfo->keyPolicy.cipherMode = MSC_KEYPOLICY_MODE_DES_ECB_NOPAD;
+ pKeyInfo->keyPolicy.cipherDirection = MSC_KEYPOLICY_DIR_ENCRYPT | MSC_KEYPOLICY_DIR_DECRYPT;
+ break;
+
+ default:
+ pKeyInfo->keyPolicy.cipherMode = 0;
+ pKeyInfo->keyPolicy.cipherDirection = 0;
+ break;
+ }
+
return convertSW(&apduResponse[currentPointer]);
} else {
return MSC_UNSPECIFIED_ERROR;