Patch fixing PIN-pad support for Oberthur AuthentIC card

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Patch fixing PIN-pad support for Oberthur AuthentIC card

Andreas Steffen-2
Hi,

I'm posting a small patch for opensc-0.9.4 (should apply smoothly to
0.9.6 as well) which allows the use of the Oberthur AuthentIC card
with a PIN-pad equipped reader. I'm currently using a Kobil Kaan
Professional reader with USB interface.

Regards

Andreas

BTW - would the OpenSC team be interested in integrating a couple of
patches for openct and opensc which allows opensc-tool to send
messages to the Kobil's display and also get input from the key pad?

  opensc-tool --output 'Hello\nSweetie!        '

  opensc-tool --input 'Enter your age:\n'
  25

The interface is generic so that potentially any key-pad and/or
display can be supported and it uses the openct driver.

=======================================================================
Andreas Steffen                   e-mail: [hidden email]
strongSec GmbH                    home:   http://www.strongsec.com
Alter Z?richweg 20                phone:  +41 1 730 80 64
CH-8952 Schlieren (Switzerland)   fax:    +41 1 730 80 65
==========================================[strong internet security]===

--- opensc-0.9.4/src/libopensc/card-oberthur.c 2004-07-23 18:55:28.000000000 +0200
+++ opensc-0.9.4-strongswan/src/libopensc/card-oberthur.c 2005-04-05 13:53:01.000000000 +0200
@@ -1828,6 +1828,20 @@
  }
 }
 
+static int
+auth_pin_cmd(struct sc_card *card, struct sc_pin_cmd_data *data,
+ int *tries_left)
+{
+ int rv, pin_ref;
+
+ rv = auth_get_pin_reference (card, data->pin_type, 1, SC_PIN_CMD_VERIFY, &pin_ref);
+ if (rv)
+ return rv;
+ data->pin_reference = pin_ref;
+
+ return iso_ops->pin_cmd(card, data, tries_left);
+}
+
 
 static int
 auth_verify(struct sc_card *card, unsigned int type,
@@ -2319,7 +2333,7 @@
  auth_ops.compute_signature = auth_compute_signature;
  auth_ops.decipher = auth_decipher;
 
- auth_ops.pin_cmd = NULL;
+ auth_ops.pin_cmd = auth_pin_cmd;
  auth_ops.verify = auth_verify;
  auth_ops.reset_retry_counter = auth_reset_retry_counter;
  auth_ops.change_reference_data = auth_change_reference_data;

_______________________________________________
opensc-devel mailing list
[hidden email]
http://www.opensc.org/cgi-bin/mailman/listinfo/opensc-devel
Reply | Threaded
Open this post in threaded view
|

Re: Patch fixing PIN-pad support for Oberthur AuthentIC card

Andreas Jellinghaus-2
On Thursday 26 May 2005 10:47, Andreas Steffen wrote:
> I'm posting a small patch for opensc-0.9.4 (should apply smoothly to
> 0.9.6 as well) which allows the use of the Oberthur AuthentIC card
> with a PIN-pad equipped reader. I'm currently using a Kobil Kaan
> Professional reader with USB interface.

Hi Andreas, thanks for the patch.
currently Martin Paljak is working on the pinpad code, too,
so I'm waiting for a comment from his to make sure your work
and his work do not conflict.

Also we would like to concentrate on getting a new HEAD release,
and HEAD is very different from 0.9.6, so don't know if there are
any conflicts, and currently I'm not sure if we will do another 0.9.*
release anyway.

I'm also very interested in those patches for opensc and openct.

Btw: oberthur and the kobil kaan work fine foe you?
I'd be happy to get some feedback (i.e. what works without
patches, what functionality need those patches etc.)

Regards, Andreas
_______________________________________________
opensc-devel mailing list
[hidden email]
http://www.opensc.org/cgi-bin/mailman/listinfo/opensc-devel