Dear OCF users,
How can i sign datas using OCF1.2 with a Gemsafe 16K card and a GCR410
readers (or GCR 400) ?
I've tried several piece of code but i'm not able to sign datas. In fact,
i'm unable to find certificates on the card.
This address :3F00:0200 is marked as PK DIRECTORY. GPKKeyManagementService
kms.pkDIR gives me 6 objects :
System.out.println("\nPK Directory");
byte[] list = kms.pkDir(path);
if(list != null) {
for(int i = 0; i < list.length; i += 3) {
int fileSize = ArrayUtils.decodeByte(list[i+1])*256 +
ArrayUtils.decodeByte(list[i+2]);
System.out.println("File with SFI " + HexString.hexify(list[i]) + "
has body size of " + fileSize + " bytes.");
}
}
Output was :
File with SFI 07 has body size of 84 bytes. File with SFI 08 has body size
of 84 bytes. File with SFI 09 has body size of 148 bytes. File with SFI 0A
has body size of 148 bytes. File with SFI 0B has body size of 148 bytes.
File with SFI 0C has body size of 148 bytes.
I use this code to sign datas :
GPKSignatureService scs =
(GPKSignatureService)sc.getCardService(GPKSignatureService.class,true);
CardFilePath cfp = new CardFilePath(":3F00:0200:0207");
GPKSignatureKeyFile kf = new
GPKSignatureKeyFile(cfp,1024,GPKSignatureKeyFile.UNCERTIFIED_KEY);
// Let the card generate a signature
scs.signData(kf,JCAStandardNames.SHA1_RSA,JCAStandardNames.PKCS_PADDING,data
);
Help needed ! Samples are welcome.
Frankinet Philippe
NSI s.a.
T�l : 04 239 91 50
http://www.nsi-sa.be
---
> 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.