Am Freitag 11 September 2009 08:47:38 schrieb François Leblanc:
> Hello,
>
> This new patch with corrections noticed by Andreas,
Thanks, commited to trunk with below changes.
Regards, Andreas
diff -u src/libopensc/card-westcos.c src/libopensc/card-westcos.c
--- src/libopensc/card-westcos.c (revision 0)
+++ src/libopensc/card-westcos.c 2009-09-11 11:13:06.000000000 +0200
@@ -199,15 +199,6 @@
return SC_ERROR_CARD_CMD_FAILED;
}
-static int sc_get_response(struct sc_card *card, size_t * count, u8 * buf)
-{
- if (card == NULL)
- return SC_ERROR_INVALID_ARGUMENTS;
- if (card->ops->get_response == NULL)
- return SC_ERROR_NOT_SUPPORTED;
- return card->ops->get_response(card, count, buf);
-}
-
typedef struct mon_atr {
int len;
int flags;
@@ -1499,7 +1490,6 @@
case SC_CARDCTL_WESTCOS_CHANGE_KEY:
if (1) {
int lrc;
- u8 *p = (u8 *) ptr;
u8 temp[7];
sc_changekey_t *ck = (sc_changekey_t *) ptr;
sc_autkey_t master_key;
diff -u src/libopensc/p15emu-westcos.c src/libopensc/p15emu-westcos.c
--- src/libopensc/p15emu-westcos.c (revision 0)
+++ src/libopensc/p15emu-westcos.c 2009-09-11 11:14:21.000000000 +0200
@@ -26,6 +26,7 @@
#include "pkcs15.h"
#include "cardctl.h"
+#include "compat_strlcpy.h"
static int sc_pkcs15emu_westcos_init(sc_pkcs15_card_t * p15card)
{
diff -u src/pkcs15init/pkcs15-westcos.c src/pkcs15init/pkcs15-westcos.c
--- src/pkcs15init/pkcs15-westcos.c (revision 0)
+++ src/pkcs15init/pkcs15-westcos.c 2009-09-11 11:18:44.000000000 +0200
@@ -29,6 +29,7 @@
#include <opensc/opensc.h>
#include <opensc/cardctl.h>
#include "pkcs15-init.h"
+#include "profile.h"
#ifdef ENABLE_OPENSSL
#include <openssl/rsa.h>
@@ -42,6 +43,7 @@
extern int sc_check_sw(sc_card_t *card, unsigned int sw1, unsigned int sw2);
+#if 0
/*
* Get private and public key file
*/
@@ -67,7 +69,7 @@
/* Get the public key file */
path.len -= 2;
sc_append_file_id(&path, 0x1012);
- r = r = SC_ERROR_NOT_SUPPORTED; //sc_profile_get_file_by_path(profile, &path, pukf);
+ r = SC_ERROR_NOT_SUPPORTED; //sc_profile_get_file_by_path(profile, &path, pukf);
if (r < 0) {
sc_file_free(*prkf);
return r;
@@ -75,14 +77,12 @@
return 0;
}
+#endif /* currently unused */
static int westcos_pkcs15init_init_card(sc_profile_t *profile,
sc_card_t *card)
{
int r;
- u8 buf[8];
- char serial[128];
- //struct sc_file *file;
struct sc_path path;
sc_format_path("3F00", &path);
@@ -108,6 +108,7 @@
return 0;
}
+#if 0
/*
* Create a PIN domain (i.e. a sub-directory holding a user PIN)
*/
@@ -118,6 +119,7 @@
{
return SC_ERROR_NOT_SUPPORTED; //sc_pkcs15_create_pin_domain(profile, card, id, ret);
}
+#endif /* currently unused */
/*
* Select the PIN reference
@@ -146,7 +148,6 @@
const u8 *puk, size_t puk_len)
{
int r;
- u8 buf[256];
sc_file_t *file = sc_file_new();
sc_path_t path;
@@ -306,6 +307,9 @@
sc_pkcs15_object_t *obj,
sc_pkcs15_prkey_t *key)
{
+ return SC_ERROR_NOT_SUPPORTED;
+
+#if 0
int r;
sc_file_t *keyfile;
sc_pkcs15_prkey_info_t *key_info = (sc_pkcs15_prkey_info_t *) obj->data;
@@ -321,6 +325,7 @@
//sc_file_free(keyfile);
return r;
+#endif
}
/*
@@ -339,7 +344,6 @@
RSA *rsa = RSA_new();
BIGNUM *bn = BN_new();
BIO *mem = BIO_new(BIO_s_mem());
- u8 buf[128];
#endif
#ifndef ENABLE_OPENSSL
_______________________________________________
opensc-devel mailing list
[email protected]
http://www.opensc-project.org/mailman/listinfo/opensc-devel