Hi all again.

I'm trying to "read" or "access" a certificate in a Smart Card.
I'm dealing with "SignatureCardService" object but... i ain't wanna
work...

Here is the code fragment:
---- 8< ----------------------------------------------------------------
System.out.println("Java.home: " + System.getProperty("java.home") );
System.out.println("reading smartcard file.");
// here, the application code will be filled in
try {
        System.out.println("Initializing the environment.");
        SmartCard.start();
        System.out.println("SmartCard environment set.");
        System.out.println("Requesting a \"CardRequest\" object.");
        CardRequest cr = new CardRequest(CardRequest.ANYCARD, null,
SignatureCardService.class);

        System.out.println("Requesting a \"SmartCard\" object.");
        SmartCard sc = SmartCard.waitForCard(cr);


        System.out.println("Requesting a \"SignatureCardService\" object.");
        SignatureCardService scs = (SignatureCardService)
sc.getCardService(SignatureCardService.class, true);

        System.out.println("Leaving the SmartCard.");
        sc.close();
} catch (Exception e) {
        System.out.println("ERROR: " + e.getMessage() );
        e.printStackTrace(System.err);
} finally { // even in case of an error...
        try {
                System.out.println("Shutting down the environment.");
                SmartCard.shutdown();
                System.out.println("SmartCard environment shut down.");
        } catch (Exception e) {
                System.out.println("ERROR: " + e.getMessage() );
                e.printStackTrace(System.err);
        }
}
System.exit(0);
---- 8< ----------------------------------------------------------------



Here are my "opencard.properties" settings:
---- 8< ----------------------------------------------------------------
OpenCard.property = new_value
OpenCard.property.override = true


OpenCard.services = \
        opencard.opt.util.PassThruCardServiceFactory \


OpenCard.terminals = \
        com.ibm.opencard.terminal.pcsc10.Pcsc10CardTerminalFactory \
---- 8< ----------------------------------------------------------------


And here is the output of the program:
---- 8< ----------------------------------------------------------------
Java.home: C:\java\jre
reading smartcard file.
Initializing the environment.
SmartCard environment set.
Requesting a "CardRequest" object.
Requesting a "SmartCard" object.
[INFO     ]
opencard.core.service.CardServiceRegistry.getCardServiceClass
--- message   no CardService for interface
opencard.opt.signature.SignatureCardService
--- thread    Thread[main,5,main]
--- source    opencard.core.service.CardServiceRegistry@110b053++
registered factory opencard.opt.util.PassThruCardServiceFactory@c21495


[INFO     ]
opencard.core.service.CardServiceRegistry.isCardRequestSatisfied
--- message   requested CardService class interface
opencard.opt.signature.SignatureCardService not supported for
opencard.core.terminal.CardID@93dcd ATR: 3B EF 00 00 40 14 80 25 43 45
52 45 53 57 01 16
01 01 03 90 00
--- thread    Thread[main,5,main]
--- source    opencard.core.service.CardServiceRegistry@110b053++
registered factory opencard.opt.util.PassThruCardServiceFactory@c21495


[INFO     ] opencard.core.service.CardServiceRegistry.getSmartCard
--- message   CardRequest opencard.core.service.CardRequest@1034bb5
ANYCARD
service  = interface opencard.opt.signature.SignatureCardService cannot
be satisfied with opencard.core.terminal.CardID@93dcd ATR: 3B EF 00 00
40 14 80 25 43 45 52 45 53 57 01 16
01 01 03 90 00
--- thread    Thread[main,5,main]
--- source    opencard.core.service.CardServiceRegistry@110b053++
registered factory opencard.opt.util.PassThruCardServiceFactory@c21495


Program terminated
---- 8< ----------------------------------------------------------------


What should I have in the "opencard.properties" to work with the
SignatureCardService service?
Any specific details about the terminal?

As always, thanks in advance for your kind help.

______________________________________________
Arturo Garc�a Mart�n - [EMAIL PROTECTED]
eSolutions Consultant - eBusiness Architect
BURKE, Software y Servicios - +34.91.571.55.50
http://www.burke.es/ <http://www.burke.es/>




---
> Visit the OpenCard web site at http://www.opencard.org/ for more
> information on OpenCard---binaries, source code, documents.
> This list is being archived at http://www.opencard.org/archive/opencard/

! To unsubscribe from the [EMAIL PROTECTED] mailing list send an email
! to
!                           [EMAIL PROTECTED]
! containing the word
!                           unsubscribe 
! in the body.

Reply via email to