Ccrt pg
Upcoming SlideShare
Loading in...5
×
 

Ccrt pg

on

  • 338 views

 

Statistics

Views

Total Views
338
Views on SlideShare
338
Embed Views
0

Actions

Likes
0
Downloads
0
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Ccrt pg Ccrt pg Document Transcript

  • SMART-CARD Smart- ! "# !"#$% 18 2001
  • B ! ?DDKO C$>FGHD# "$CHMI!# $L!"?D!H QFD>T!O (% "#!PH @NK>? ), %U$C@V!U %C!D?G!AH">! N?EMFI?HGFW J!JP!$#H>F chkcert.dll. M!%$C!#"@ DH$JU$C!G?@ "LM?%$AD?@ !DQ$MG?T!@, "%HCHD!@ $ %$NG$IDKU $S!J>?U,%$ND!>?WV!U LM! M?J$#H QFD>T!O J!JP!$#H>!.DSSSCT File : ccrt_pg.doc Ref : CHKCERTPG0000 Revision:2.0 2 / 18 Copyright © Dekart S.R.L (www.dekart.com) - 2001 This document shall not be disclosed to a third party without prior written consent of Dekart S.R.L. !>?>?@ A?"#B C?DD$E$ C$>FGHD#? DH G$IH# JK#B %$"LM$!N%HCHD? % >?>$O JK #$ D! JKP$ Q$MGH ! >?>!G! JK, #$ D! JKP$ "MHC"#%?G! JHN L!"BGHDD$E$ M?NMHSHD!@ %P?CHPBT? ?%#$M">!U LM?%. @ A .
  • F1. HI# JKFLFMJN J O@LFPKQI FRFSKBTIKJN (MLF@@B#JV)..................................... 4 1.1 ........................................................................................................................................... 4 1.2 Y Z ............................................................................................................... 4 1.3 Z ] ................................................................................. 4 1.4 ^ .............................................................................................................................. 52. KBSKBTIKJI RJRLJFHIYJ CHKCERT.DLL .......................................................................... 63. FRJI @PI]IKJN ........................................................................................................................... 63. F J@BKJI ^OKY_JV RJRLJFHIYJ CHKCERT.DLL......................................................... 7 3.1. ^OKY_JN OPENCHKSESSION ......................................................................................................... 7 3.2. ^OKY_JN CHKCERT ....................................................................................................................... 7 3.3. ^OKY_JN CHKSCERT ..................................................................................................................... 8 3.4. ^OKY_JN CLOSECHKSESSION ....................................................................................................... 94. #JLFdIKJN..................................................................................................................................... 9 4.1. @FFRIKJN FR FfJRYBg............................................................................................................. 9 4.2. #J I# PQSFPB ^OKY_JV F]OLN JS #FM#B Q (BORLAND C++ V.5.01) ....................... 13 4.3. #ISOLmHBHQ #BRFHQ HI@HFPFMF #J I#B ]LN ^OKY_JV F]OLN .................................... 16DSSSCT File : ccrt_pg.doc Ref : CHKCERTPG0000 Revision:2.0 3 / 18 Copyright © Dekart S.R.L (www.dekart.com) - 2001 This document shall not be disclosed to a third party without prior written consent of Dekart S.R.L. !>?>?@ A?"#B C?DD$E$ C$>FGHD#? DH G$IH# JK#B %$"LM$!N%HCHD? % >?>$O JK #$ D! JKP$ Q$MGH ! >?>!G! JK, #$ D! JKP$ "MHC"#%?G! JHN L!"BGHDD$E$ M?NMHSHD!@ %P?CHPBT? ?%#$M">!U LM?%. @ A .
  • 1. H A (M ")1.1 @@O # – !"#HG? FAH#? L$#MHJPHD!@ MH"FM"$% ! JHND?P!ADKU M?"AH#$% "!"L$PBN$%?D!HG smart->?M# (D?N%?D!H "!"#HGK).Payflex - D#HPPH>#F?PBD?@ (smart) >?M#? Q!MGK Schlumberger, >$#$M?@ L$P$IHD? %$"D$%F "!"#HG JHND?P!ADKU M?"AH#$%, M?NM?J?#K%?HGKU >$GL?D!HO Dekart S.R.L.SCR-60, Reflex 60, Reflex 72 (Schlumberger), TOWITOKO ChipDrive - "A!#K%?#HP!smart->?M#, !"L$PBNFWV!H"@ % $#CHPBDKU #HUD$P$E!AH">!U N%HDB@U . ?J$#?W##$PB>$ "$%GH"#D$ " >$GLBW#HM$G, ! FLM?%P@W#"@ LM$EM?GGDKG $JH"LHAHD!HG,M?J$#?WVHG D? >$GLBW#HMH.t - $ME?D!N?T!@, %KL$PD@WV?@ LHM"$D?P!N?T!W >?M# CHMI?#HPHO, %HCFV?@J?NK >?M#-"AH#$% CHMI?#HPHO ! $JM?J?#K%?WV?@ LP?#hIDKH #M?DN?>T!!. _ - LM$TH""!DE$%KO THD#M. $CM?NCHPHD!H (FA?"#D!>) "!"#HGK, % N?C?A! >$#$M$E$%U$C!# $J"PFI!%?D!H #HMG!D?PBD$E$ L$P@, "J$M #M?DN?>T!O $# #HMG!D?P$%, !U"$M#!M$%>F ! M?""KP>F iG!#HD#?G._@ – THD#M "!"#HGK. ME?D!N?T!@, N?D!G?WV?@"@ LMHC%?M!#HPBD$OLHM"$D?P!N?T!HO >?M# CHMI?#HPHO ! !U LHMHC?AHO iG!#HD#?G (FA?"#D!>?G "!"#HGK)._@Y - THD#M "HM#!Q!>?T!! >PWAHO (Certificate authority). ME?D!N?T!@,$JH"LHA!%?WV?@ "HM#!Q!>?T!W >PWAHO FA?"#D!>$% "!"#HGK. !"# . QFD>T!! THD#M? "!"#HGK ! THD#M? "HM#!Q!>?T!! >PWAHO%KL$PD@H# $CD? $ME?D!N?T!@.] A - Q!N!AH">$H P!T$, !"L$PBNFWVHH >?M#F % >?AH"#%H LP?#hID$E$!D"#MFGHD#? LM! $LP?#H #$%?M? !P! F"PFE!. ! – F"P$%D?@ #$%?M$-CHDHID?@ HC!D!T? (MFJP!, PH!, C$PP?MK,P!#MK, > #·A. ! #.C.), !"L$PBNFHG?@ % % >?AH"#%H "MHC"#%? LP?#HI?.1.2 @ AuDES (Data Encryption Standard) - #?DC?M# S!QM$%?D!@ C?DDKU. !GGH#M!AD?@"!"#HG? S!QM$%?D!@ " CP!D$O >PWA? ! S!QMFHG$E$ JP$>? C?DDKU 64 J!#?.nQQH>#!%D?@ CP!D? >PWA? D? "?G$G CHPH M?%D? 56 ($C!D J!# >?IC$E$ J?O#?!"L$PBNFH#"@ % >?AH"#%H >$D#M$PBD$E$).RSA - "!"#HG? S!QM$%?D!@ D? $"D$%H $#>MK#KU >PWAHO. M!GHD@H#"@ % "!"#HGH CP@"#?#!AH">$O ?F#HD#!Q!>?T!! >?M# CHMI?#HPHO.SHS (Secure Hash Standard) - #?DC?M# D? UHS-QFD>T!W. #?DC?M# $LMHCHP@H#?PE$M!#G Secure Hash Algorithm (SHA-1), >$#$MKO G$IH# !"L$PBN$%?#B"@ CP@"$NC?D!@ ""I?#$E$" LMHC"#?%PHD!@ DH>$#$M$O L$"PHC$%?#HPBD$"#!. ?>$HLMHC"#?%PHD!H D$"!# D?N%?D!H $"%$& (" )*+ $*,"( +-#*( .1.3 Y A A ! vSAM (Secure Application Module) – "LHT!?PBD?@ >?M#?, >$#$M?@ $JH"LHA!%?H#JHN$L?"D$"#B LM! $LHM?T!@U CHJH#$%?D!@ ! >MHC!#$%?D!@.Y (!P! >?M#? LHM"$D?PBDKU >PWAHO) – "LHT!?PBD?@ >?M#?, >$#$M?@LMHCD?ND?AHD? CP@ N?V!VHDD$E$ UM?DHD!@ >PWA? (>PWAHO) C$"#FL? $#%H#"#%HDDKUP!T "!"#HGK. ?M#? C$"#FL? LM!D?CPHI!# >$D>MH#D$GF $#%H#"#%HDD$GF P!TF"!"#HGK ! N?V!VHD? HE$ LHM"$D?PBDKG !CHD#!Q!>?T!$DDKG D$GHM$G (PIN->$C$G).@ " A" A - DH!NGHD@HG?@, FD!>?PBD?@ CP@ >?IC$O >?M#K C%$!AD?@L$"PHC$%?#HPBD$"#B CP!D$O 8 J?O#, N?L!"K%?HG?@ D? >?M#F N?%$C$G !NE$#$%!#HPHG.DSSSCT File : ccrt_pg.doc Ref : CHKCERTPG0000 Revision:2.0 4 / 18 Copyright © Dekart S.R.L (www.dekart.com) - 2001 This document shall not be disclosed to a third party without prior written consent of Dekart S.R.L. !>?>?@ A?"#B C?DD$E$ C$>FGHD#? DH G$IH# JK#B %$"LM$!N%HCHD? % >?>$O JK #$ D! JKP$ Q$MGH ! >?>!G! JK, #$ D! JKP$ "MHC"#%?G! JHN L!"BGHDD$E$ M?NMHSHD!@ %P?CHPBT? ?%#$M">!U LM?%. @ A .
  • BIN (Bank Identification Number) – !CHD#!Q!>?T!$DDKO D$GHM iG!#HD#? (8 T!QM),"$"#?%PHDDKO % "$$#%H#"#%!! "$ "#?DC?M#$G ISO.PIN (Personal Identification Number) – LHM"$D?PBDKO !CHD#!Q!>?T!$DDKO D$GHML$PBN$%?#HP@ ($# 4 C$ 8 CH"@#!ADKU T!QM). P?CHPHT >?M#K $J@N?D CHMI?#B "%$O PIN- >$C % "H>MH#H.PAN (Primary Account Number) – D$GHM >?M#K (19 T!QM), LHM%KH 8 T!QM >$#$M$E$"$$#%H#"#%FW# BIN.ID (Identifier) – !CHD#!Q!>?#$M (8 T!QM), $LMHCHP@WV!O !GHD? Q?OP$%, % >$#$MKUN?L!"K%?W#"@ RSA >PWA! LM$TH""!DE$%$E$ THD#M? ! iG!#HD#?, N?LM$" D?"HM#!Q!>?T!W ! "HM#!Q!>?#, ? #?>IH PAN->$CK iG!#HD#?. $%L?C?H# " BIN.1.4 Y x AY x – %DF#MHDD!H >PWA!, >$#$MKH UM?D@#"@ D? >?M#H C$"#FL? !LM!GHD@W#"@ CP@ «$#>MK#!@» M?NP!ADKU #HUD$P$E!AH">!U LM!P$IHD!O "!"#HGK,LM!AHG % J$PBS!D"#%H "PFA?H% $D! "PFI?# CP@ ?>#!%!N?T!! CMFE!U ("H>MH#DKU)>PWAHO "!"#HGK.] ! x - "M?"LKPHD!H" >PWA?. "L$PBNFH#"@ CP@!DC!%!CF?P!N?T!! %DF#MHDD!U >PWAHO >?M# CHMI?#HPHO. x - "H>MH#DKO >PWA "!GGH#M!AD$O "!"#HGK S!QM$%?D!@, !"L$PBNFHGKO% "!"#HGH CP@ C!%HM"!Q!>?T!! >PWAHO >?M# CHMI?#HPHO. - $#>MK#?@ A?"#B >PWA? "!"#HGK S!QM$%?D!@ RSA.t - $#>MK#?@ A?"#B >PWA? RSA. $IH# JK#B M?%D$O 3 P!J$ AH#%hM#$GFA!"PF ZHMG? (Fermat 4 = 2^2^4+1 = 65537). i>"L$DHD#? M?%D? 3.@ - C%$!AD?@ L$"PHC$%?#HPBD$"#B, L$PFA?HG?@ "LHT!?PBDKG!>M!L#$EM?Q!AH">!G! GH#$C?G! ! "PFI?V?@ CP@ LM$%HM>! C$"#$%HMD$"#! DH>$#$M$OL$"PHC$%?#HPBD$"#! C?DDKU.@ " - L$"PHC$%?#HPBD$"#B C%$!ADKU C?DDKU, >$#$M?@"$NC?h#"@ "LHT!?PBDKG! GHU?D!NG?G! % >?M#?U ! #HMG!D?P?U CP@ G$C!Q!>?T!!"$$JVHD!O " THPBW !DC!%!CF?P!N?T!! LM$#$>$P? $JGHD? $# $CD$E$ "H?D"? > CMFE$GFDSSSCT File : ccrt_pg.doc Ref : CHKCERTPG0000 Revision:2.0 5 / 18 Copyright © Dekart S.R.L (www.dekart.com) - 2001 This document shall not be disclosed to a third party without prior written consent of Dekart S.R.L. !>?>?@ A?"#B C?DD$E$ C$>FGHD#? DH G$IH# JK#B %$"LM$!N%HCHD? % >?>$O JK #$ D! JKP$ Q$MGH ! >?>!G! JK, #$ D! JKP$ "MHC"#%?G! JHN L!"BGHDD$E$ M?NMHSHD!@ %P?CHPBT? ?%#$M">!U LM?%. @ A .
  • 2. K chkcert.dll $CFPB chkcert.dll LMHCD?ND?AHD CP@ LM$%HM>! "HM#!Q!>?#$% CHJH#$%KU !>MHC!#$%KU #M?DN?>T!O. ZFD>T!! J!JP!$#H>! D? $"D$%?D!! C?DDKU $ #M?DN?>T!!L$N%$P@W# LM$%HM!#B ?F#HD#!AD$"#! HH "HM#!Q!>?#?. !3. F y !D?G!AH">! N?EMFI?HG?@ J!JP!$#H>? chkcert.dll %>PWA?H# % "HJ@ "PHCFWV!HQFD>T!!:• OpenChkSession – !D!T!?P!N?T!@ LM$TH""?;• ChkCert – LM$%HM>? "HM#!#!Q!>?#? #M?DN?>T!!, %KL$PDHDD$O >?M#$O PAYFLEX4K;• ChkSCert - LM$%HM>? "HM#!#!Q!>?#? #M?DN?>T!!, %KL$PDHDD$O >?M#$O PAYFLEX4K (Mask 5.0 S);• CloseChkSession – N?%HMSHD!H LM$TH""?. M!GHA?D!H. ?J$#? " G$CFPHG C$PID? D?A!D?#B"@ %KN$%$G QFD>T!!OpenChkSession ! N?%HMS?#B"@ %KN$%$G QFD>T!! CloseChkSession.ZFD>T!!, %U$C@V!H % G$CFPB chkcert.dll, MH?P!N$%?DK D? @NK>?U LM$EM?GG!M$%?D!@ , C++. H$JU$C!G$H $J$MFC$%?D!H:• $GLBW#HM IBM PC (486 ! %KSH), !GHWV!O "%$J$CDKH L$"PHC$%?#HPBDKH L$M#K;• Smart->?M#K: >?M#? C$"#FL?;• A!#K%?#HPB smart->?M# $CD$E$ !N "PHCFWV!U #!L$%: SCR-60, Reflex 60, Reflex 72 (Schlumberger), TOWITOKO ChipDrive. H$JU$C!G$H LM$EM?GGD$H $JH"LHAHD!H:• LHM?T!$DD?@ "!"#HG? MS Windows 9x, NT;• CT API CP@ "A!#K%?#HPHO TOWITOKO ChipDrive ! Schlumberger Reflex 72;• Z?OP %#$M$O EMFLLK >PWAHO iG!#HD#? ID_iG!#HD#?.se2. "#?D$%>? G$CFP@ chkcert.dll $"FVH"#%P@H#"@ LM$"#KG HE$ >$L!M$%?D!HG %"$$#%H#"#%FWV!O >?#?P$E (SYSTEM, SYSTEM32) "!"#HGK Windows.DSSSCT File : ccrt_pg.doc Ref : CHKCERTPG0000 Revision:2.0 6 / 18 Copyright © Dekart S.R.L (www.dekart.com) - 2001 This document shall not be disclosed to a third party without prior written consent of Dekart S.R.L. !>?>?@ A?"#B C?DD$E$ C$>FGHD#? DH G$IH# JK#B %$"LM$!N%HCHD? % >?>$O JK #$ D! JKP$ Q$MGH ! >?>!G! JK, #$ D! JKP$ "MHC"#%?G! JHN L!"BGHDD$E$ M?NMHSHD!@ %P?CHPBT? ?%#$M">!U LM?%. @ A .
  • 3. F ! " chkcert.dll 3.1. ^ ! OpenChkSession."/,"# : OpenChkSession."/#"! # : ZFD>T!@ $JH"LHA!%?H# !D!T!?P!N?T!W LM$TH""? LM$%HM>! "HM#!Q!>?#? #M?DN?>T!!.0+*, 1 ) # # 1: H$JU$C!G$ D?P!A!H >?M#K C$"#FL? iG!#HD#? ! Q?OP? "$ %#$M$O EMFLL$O >PWAHO iG!#HD#?.3 #("4 : #include "ChkCert.h" int OpenChkSession (char *Port, short ReaderType, char *Iss_KeyFile, char *PIN, char *IccNo)56*$#7 $"##7 : Port – F>?N?#HPB D? "#M$>F "$CHMI?VFW !G@ >$GGFD!>?T!$DD$E$ L$M#? (D?LM!GHM, COM1, COM2, COM3, COM4). ReaderType – THP$H A!"P$, F>?NK%?WVHH #!L "A!#K%?#HP@. $CCHMI!%?W#"@ 4 #!L? "A!#K%?#HPHO: ‡ L.L. M$!N%$C!#HPB / ?N%?D!H ReaderType 1 Schlumberger / SCR 60 0 2 Schlumberger / Reflex 60 1 3 TOWITOKO / ChipDrive 2 4 Schlumberger / Reflex 72 3 Iss _KeyFile – F>?N?#HPB D? "#M$>F, "$CHMI?VFW LF#B ! !G@ Q?OP? "$ %#$M$O EMFLL$O >PWAHO iG!#HD#? (C$ 256 "!G%$P$%). PIN – F>?N?#HPB D? "#M$>F, "$CHMI?VFW PIN–>$C >?M#K C$"#FL?. PIN– >$C G$IH# "$"#$@#B $# 4 C$ 8 CH"@#!ADKU T!QM.576*$#7 $"##7 : IccNo – F>?N?#HPB D? JFQHM ("#M$>F), % >$#$M$G JFCH# %$N%M?VhD "HM!ODKO D$GHM >?M#K C$"#FL?. ?NGHM JFQHM? C$PIHD JK#B DH GHDHH 33 J?O#$%.5*/, "8" * /#"! # : 1 – % "PFA?H F"LHSD$E$ N?%HMSHD!@ LM$EM?GGK, !D?AH $#M!T?#HPBD$H ND?AHD!H >$C? $S!J>! ("G. >$CK $S!J$> L. 4.1).9: "# ! # 1: H$JU$C!G$ "$JPWCHD!@ "#M$E$E$ "$$#%H#"#%!@ #!L? "A!#K%?#HP@ (ReaderType) " MH?PBDKG "A!#K%?#HPHG, L$C>PWAhDDKG > C?DD$GF L$"PHC$%?#HPBD$GF L$M#F. H"$JPWCHD!H i#$E$ $EM?D!AHD!@ LM!%$C!# > DHLMHC">?NFHGKG MHNFPB#?#?G. ,7/*," ;<#4= / ) *: " 7 (BC++ v.5.01) "G. L. 4.2 3.2. ^ ! ChkCert."/,"# : ChkCertDSSSCT File : ccrt_pg.doc Ref : CHKCERTPG0000 Revision:2.0 7 / 18 Copyright © Dekart S.R.L (www.dekart.com) - 2001 This document shall not be disclosed to a third party without prior written consent of Dekart S.R.L. !>?>?@ A?"#B C?DD$E$ C$>FGHD#? DH G$IH# JK#B %$"LM$!N%HCHD? % >?>$O JK #$ D! JKP$ Q$MGH ! >?>!G! JK, #$ D! JKP$ "MHC"#%?G! JHN L!"BGHDD$E$ M?NMHSHD!@ %P?CHPBT? ?%#$M">!U LM?%. @ A .
  • ."/#"! # : ZFD>T!@ $"FVH"#%P@H# LM$%HM>F "HM#!#!Q!>?#? #M?DN?>T!!, %KL$PDHDD$O >?M#$O PAYFLEX 4K.3 #("4 : #include "ChkCert.h" int ChkCert (char Type, char *Rnd, char *Amn, char *CurTrno, char *Crt, char *SerNo)56*$#7 $"##7 : Type – "!G%$P, $LMHCHP@WV!O #!L #M?DN?>T!!: • ‘P’, ‘F’, ‘A’ – $ N (*,"1 ( "#/"4= 1 ; • ‘R’, ‘X’, ‘T’ – 4 $ (*,"1 ( "#/"4= 1. Rnd – F>?N?#HPB D? "#M$>F (16 "!G%$P$%), "$CHMI?VFW "PFA?ODFW L$"PHC$%?#HPBD$"#B % Q$MG?#H ASCII % SH"#D?CT?#HM!AD$G >$CH (QFD>T!! DebitTransacion, CreditTransaction). Amn - F>?N?#HPB D? "#M$>F (C$ 12 CH"@#!ADKU T!QM), "$CHMI?VFW "FGGF CHJH#?/>MHC!#? % Q$MG?#H ASCII. CurTrno – F>?N?#HPB D? "#M$>F, "$CHMI?VFW: • >$C %?PW#K (3 CH"@#!ADKH T!QMK) % "PFA?H CHJH#$%$O #M?DN?>T!!; • D$GHM #M?DN?>T!! (4 "!G%$P?) % Q$MG?#H ASCII % SH"#D?CT?#HM!AD$G >$CH >$SHPB>? SAM->?M#K % "PFA?H >MHC!#$%$O #M?DN?>T!! Crt – F>?N?#HPB D? "#M$>F (12 "!G%$P$%), "$CHMI?VFW "HM#!Q!>?# (L$CL!"B) $LHM?T!! CHJH#$%?D!@/>MHC!#$%?D!@ >$SHPB>? % Q$MG?#H ASCII % SH"#D?CT?#HM!AD$G >$CH (QFD>T!! DebitTransacion, CreditTransaction). SerNo – F>?N?#HPB D? "#M$>F (16 "!G%$P$%), "$CHMI?VFW "HM!ODKO D$GHM >?M#K L$PBN$%?#HP@ % Q$MG?#H ASCII % SH"#D?CT?#HM!AD$G >$CH.5*/, "8" * /#"! # : 1 – LM! L$P$I!#HPBD$G MHNFPB#?#H LM$%HM>! "HM#!Q!>?#?, 0 – LM! $#M!T?#HPBD$G MHNFPB#?#H LM$%HM>! "HM#!Q!>?#?, !D?AH $#M!T?#HPBD$H ND?AHD!H >$C? $S!J>! ("G. >$CK $S!J$> % L. 4.1) ,7/*," ;<#4= / ) *: " 7 (BC++ v.5.01) "G. L. 4.2 3.3. ^ ! ChkSCert."/,"# : ChkSCert."/#"! # : ZFD>T!@ $"FVH"#%P@H# LM$%HM>F "HM#!#!Q!>?#? #M?DN?>T!!, %KL$PDHDD$O >?M#$O PAYFLEX 4K (Mask 5.0 S).3 #("4 : #include "ChkCert.h" int ChkSCert (char Type, char *Rnd, char *Amn, char *CurTrno, char *Crt, char *SerNo)56*$#7 $"##7 : Type – "!G%$P, $LMHCHP@WV!O #!L #M?DN?>T!!: • ‘P’, ‘F’, ‘A’ – $ N (*,"1 ( "#/"4= 1 ; • ‘R’, ‘X’, ‘T’ – 4 $ (*,"1 ( "#/"4= 1.DSSSCT File : ccrt_pg.doc Ref : CHKCERTPG0000 Revision:2.0 8 / 18 Copyright © Dekart S.R.L (www.dekart.com) - 2001 This document shall not be disclosed to a third party without prior written consent of Dekart S.R.L. !>?>?@ A?"#B C?DD$E$ C$>FGHD#? DH G$IH# JK#B %$"LM$!N%HCHD? % >?>$O JK #$ D! JKP$ Q$MGH ! >?>!G! JK, #$ D! JKP$ "MHC"#%?G! JHN L!"BGHDD$E$ M?NMHSHD!@ %P?CHPBT? ?%#$M">!U LM?%. @ A .
  • Rnd – F>?N?#HPB D? "#M$>F (16 "!G%$P$%), "$CHMI?VFW "PFA?ODFW L$"PHC$%?#HPBD$"#B % Q$MG?#H ASCII % SH"#D?CT?#HM!AD$G >$CH (QFD>T!! DebitTransacion, CreditTransaction). Amn - F>?N?#HPB D? "#M$>F (C$ 12 CH"@#!ADKU T!QM), "$CHMI?VFW "FGGF CHJH#?/>MHC!#? % Q$MG?#H ASCII. CurTrno – F>?N?#HPB D? "#M$>F, "$CHMI?VFW: • >$C %?PW#K (3 CH"@#!ADKH T!QMK) % "PFA?H CHJH#$%$O #M?DN?>T!!; • D$GHM #M?DN?>T!! (4 "!G%$P?) % Q$MG?#H ASCII % SH"#D?CT?#HM!AD$G >$CH >$SHPB>? SAM->?M#K % "PFA?H >MHC!#$%$O #M?DN?>T!! Crt – F>?N?#HPB D? "#M$>F (12 "!G%$P$%), "$CHMI?VFW "HM#!Q!>?# (L$CL!"B) $LHM?T!! CHJH#$%?D!@/>MHC!#$%?D!@ >$SHPB>? % Q$MG?#H ASCII % SH"#D?CT?#HM!AD$G >$CH (QFD>T!! DebitTransacion, CreditTransaction). SerNo – F>?N?#HPB D? "#M$>F (16 "!G%$P$%), "$CHMI?VFW "HM!ODKO D$GHM >?M#K L$PBN$%?#HP@ % Q$MG?#H ASCII % SH"#D?CT?#HM!AD$G >$CH.5*/, "8" * /#"! # : 1 – LM! L$P$I!#HPBD$G MHNFPB#?#H LM$%HM>! "HM#!Q!>?#?, 0 – LM! $#M!T?#HPBD$G MHNFPB#?#H LM$%HM>! "HM#!Q!>?#?, !D?AH $#M!T?#HPBD$H ND?AHD!H >$C? $S!J>! ("G. >$CK $S!J$> % L. 4.1) ,7/*," ;<#4= / ) *: " 7 (BC++ v.5.01) "G. L. 4.2 3.4. ^ ! CloseChkSession."/,"# : CloseChkSession."/#"! # : ZFD>T!@ N?%HMS?H# LM$TH"" LM$%HM>! "HM#!Q!>?#? #M?DN?>T!! ! $"%$J$IC?H# "A!#K%?#HPB smart->?M#.3 #("4 : #include "ChkCert.h" void CloseChkSession (void)56*$#7 $"##7 : #"F#"#%FW#.5*/, "8" * /#"! # : #"F#"#%FH#. ,7/*," ;<#4= / ) *: " 7 (BC++ v.5.01) "G. L. 4.24. 4.1. @ y u v Y K u Y " u 9N8 4*$7 ,*/, "(" 0 NOK HD$MG?PBD$H N?%HMSHD!H LM$EM?GGK. $ND!>P? $S!J>? LM! M?J$#H " >?M#$O. 1 OK $MG?PBD$H N?%HMSHD!H LM$EM?GGK.DSSSCT File : ccrt_pg.doc Ref : CHKCERTPG0000 Revision:2.0 9 / 18 Copyright © Dekart S.R.L (www.dekart.com) - 2001 This document shall not be disclosed to a third party without prior written consent of Dekart S.R.L. !>?>?@ A?"#B C?DD$E$ C$>FGHD#? DH G$IH# JK#B %$"LM$!N%HCHD? % >?>$O JK #$ D! JKP$ Q$MGH ! >?>!G! JK, #$ D! JKP$ "MHC"#%?G! JHN L!"BGHDD$E$ M?NMHSHD!@ %P?CHPBT? ?%#$M">!U LM?%. @ A .
  • 9Q N4 *N8 :* 6" "4( " -1 ERR_PC_TIME_OUT S!J>? %KN%?D? "J$HG % M?J$#H >$GLBW#HM? -2...-7 HNHM% R ( "#+ < 7 4*$7 *Q N4 #( ; %" CT-API -8 ERR_CT_API_NOT_ACC CT-API DHC$"#FLHD -10 ERR_CT_API_TRANSMIS S!J>? LHMHC?A! -11 ERR_CT_API_MEM_ASIGN S!J>? N?U%?#? L?G@#! 9Q N4 , ,*/# 4"U8 ) "N*( ;<#4= 1 *$<+1 -12 ERR_FILE_NOT_FOUND S!J>? %KN%?D? $#"F#"#%!HG Q?OP? " >PWA?G! "!"#HGK -13 ERR_READING_FILE S!J>? LM! A#HD!! Q?OP? " >PWA?G! "!"#HGK -14 ERR_BAD_READER $@%PHD!H C?DD$O $S!J>! G$IH# E$%$M!#B $ "PHCFWVHG: • $#"F#"#%FH# "A!#K%?#HPB, !P! • #!L "A!#K%?#HP@ F>?N?D DHLM?%!PBD$, !P! • $S!J>? LM! M?J$#H "A!#K%?#HP@, !P! • F>?N?D DH%HMDKO -L$M#. -15 ERR_NO_CARD_ON_READER S!J>? %KN%?D? $#"F#"#%!HG >?M#K % "A!#K%?#HPH -16 ERR_BAD_ACCESS_CARD S!J>? LM! M?J$#H " >?M#$O C$"#FL?, %$NG$ID$, %"#?%PHD? DH >?M#? C$"#FL?, ? !D?@. -17 ERR_INVALID_PIN_LEN HLM?%!PBD?@ CP!D? PIN->$C? -18 ERR_INVALID_PIN_CHR M! %%$CH PIN->$C? JKP! !"L$PBN$%?DK DH #$PB>$ CH"@#!ADKH T!QMK -19 ERR_BAD_PIN_VERIFY PIN->$C DH %HM!Q!T!M$%?D -20 ERR_BAD_PASSWORD H%HMDKO L?M$PB C$"#FL? > "H>MH#DKG >PWA?G "!"#HGK -21 ERR_BAD_SAM_CARD S!J>? LM! M?J$#H " SAM >?M#$O, %$NG$ID$, %"#?%PHD? DH SAM >?M#?, ? !D?@. -22 ERR_BAD_USR_CARD S!J>? LM! M?J$#H " >?M#$O L$PBN$%?#HP@, %$NG$ID$, %"#?%PHD? DH >?M#? L$PBN$%?#HP@, ? !D?@. -23 ERR_INV_REC_LEN HLM?%!PBD?@ CP!D? N?L!"! -24 ERR_DNOT_FOUND_KEY #"F#"#%FH# >PWADSSSCT File : ccrt_pg.doc Ref : CHKCERTPG0000 Revision:2.0 10 / 18 Copyright © Dekart S.R.L (www.dekart.com) - 2001 This document shall not be disclosed to a third party without prior written consent of Dekart S.R.L. !>?>?@ A?"#B C?DD$E$ C$>FGHD#? DH G$IH# JK#B %$"LM$!N%HCHD? % >?>$O JK #$ D! JKP$ Q$MGH ! >?>!G! JK, #$ D! JKP$ "MHC"#%?G! JHN L!"BGHDD$E$ M?NMHSHD!@ %P?CHPBT? ?%#$M">!U LM?%. @ A .
  • -25 ERR_APP_NOT_FOUND #"F#"#%FH# LM!P$IHD!H -26 ERR_READ_CARD_FILE S!J>? A#HD!@ Q?OP? D? >?M#H -27 ERR_IDENT_NOT_FOUND ? >?M#H $#"F#"#%FH# Q?OP 8000 -28 ERR_BAD_ISS_CERT H%HMDKO "HM#!Q!>?# $#>MK#$E$ >PWA? iG!#HD#? -29 ERR_BAD_ISS_IDEND H%HMDKO iG!#HD# -30 ERR_AUTH_NOT_FOUND ? >?M#H $#"F#"#%FH# Q?OP 8300 -31 ERR_UNKNOWN_AUTH_ALG H!N%H"#DKO ?PE$M!#G ?F#HD#!Q!>?T!! -32 ERR_SN_NOT_FOUND ? >?M#H $#"F#"#%FH# Q?OP 2F00 -33 ERR_SAM_NOT_FOUND #"F#"#%FH# SAM->?M#? -34 ERR_USR_NOT_FOUND #"F#"#%FH# >?M#? L$PBN$%?#HP@ -35 ERR_USR_PURS_NOTFOUND ? >?M#H L$PBN$%?#HP@ $#"F#"#%FH# Q?OP " >$SHPB>$G -36 ERR_SAM_PURS_NOTFOUND ? SAM->?M#H $#"F#"#%FH# Q?OP " >$SHPB>$G -37 ERR_USR_IS_BAD « ?L$MAHD?» >?M#? L$PBN$%?#HP@ – L$CPHI!# !NŒ@#!W -38 ERR_SAM_IS_BAD « ?L$MAHD?» SAM->?M#? – L$CPHI!# !NŒ@#!W -39 ERR_USR_CUR_NOT_MATCH M! %KN$%H QFD>T!! F>?N?D DH%HMDKO #!L %?PW#K % >$SHPB>H >?M#K L$PBN$%?#HP@ -40 ERR_SAM_CUR_NOT_MATCH M! %KN$%H QFD>T!! F>?N?D DH%HMDKO #!L %?PW#K % >$SHPB>H SAM->?M#K -41 ERR_READ_USR_CARD S!J>? LM! A#HD!! >?M#K L$PBN$%?#HP@ -42 ERR_READ_SAM_CARD S!J>? LM! A#HD!! SAM->?M#K -43 ERR_USR_DEBIT_PURSE S!J>? LM! CHJH#$%?D!! >$SHPB>? >?M#K L$PBN$%?#HP@ -44 ERR_USR_CREDIT_PURSE S!J>? LM! >MHC!#$%?D!! >$SHPB>? >?M#K L$PBN$%?#HP@ -45 ERR_SAM_DEBIT_PURSE S!J>? LM! CHJH#$%?D!! >$SHPB>? SAM->?M#K -46 ERR_INV_ID_LEN H%HMD?@ CP!D? !CHD#!Q!>?#$M?-47...-50 HNHM% 9Q N4 , ,*/# 4"U8 ) "N*( N N+ *( 4*% mirlib ( "N*(" N*+-Q ! +" ) -51 ERR_BASE_TOO_BIG "D$%?D!H A!"P? $AHDB J$PBS$H CP@ LMHC"#?%PHD!@ -52 ERR_DIV_BY_ZERO HPHD!H D? D$PB (% J!JP!$#H>H J$PBS!U A!"HP) -53 ERR_OVERFLOW HMHL$PDHD!H – A!"P$ $AHDBDSSSCT File : ccrt_pg.doc Ref : CHKCERTPG0000 Revision:2.0 11 / 18 Copyright © Dekart S.R.L (www.dekart.com) - 2001 This document shall not be disclosed to a third party without prior written consent of Dekart S.R.L. !>?>?@ A?"#B C?DD$E$ C$>FGHD#? DH G$IH# JK#B %$"LM$!N%HCHD? % >?>$O JK #$ D! JKP$ Q$MGH ! >?>!G! JK, #$ D! JKP$ "MHC"#%?G! JHN L!"BGHDD$E$ M?NMHSHD!@ %P?CHPBT? ?%#$M">!U LM?%. @ A .
  • J$PBS$H -54 ERR_NEG_RESULT M! %KA!"PHD!! L$PFAHD$ $#M!T?#HPBD$H ND?AHD!H -55 ERR_BAD_FORMAT H%HMDKO %U$CD$O Q$MG?# A!"P? -56 ERR_BAD_BASE H%HMD$H $"D$%?D!H A!"P? -57 ERR_BAD_PARAMETERS H%HMD$H !"L$PBN$%?D!H L?M?GH#M? -58 ERR_OUT_OF_MEMORY HC$"#?#$AD$ $LHM?#!%D$O L?G@#! -59 ERR_NEG_ROOT H#DKO >$MHDB !N $#M!T?#HPBD$E$ A!"P? -60 ERR_NEG_POWER $N%HCHD!H A!"P? % $#M!T?#HPBDFW "#HLHDB -61 ERR_BAD_ROOT $LK#>? L$PFA!#B DH%HMDKO >$MHDB -62 ERR_INT_OP H%HMD?@ $LHM?T!@ D?C Flash A!"P$G -63 ERR_FLASH_OVERFLOW Flash LHMHL$PDHD!H -64 ERR_TOO_BIG !"P? $AHDB J$PBS!H -65 ERR_NEG_LOG $E?M!QG !N $#M!T?#HPBD$E$ A!"P? -66 ERR_DOUBLE_FAIL S!J>? LMH$JM?N$%?D!@ double % flash -67 ERR_IO_OVERFLOW HMHL$PDHD!H JFQHM? %%$C?/%K%$C? -68 ERR_NO_MIRSYS !JP!$#H>? J$PBS!U A!"HP DH LM$!D!T!?P!N!M$%?D? -69 ERR_BAD_MONT_MOD H%HMDKO $D#E$GHM! G$CFPB (C$PIHD JK#B DHAH#DKG) -70 ERR_NO_MONT_MOD H $LMHCHPHD $D#E$GHM! G$CFPB -71 ERR_EXP_TOO_BIG P!S>$G J$PBS?@ i>"L$DHD#? -72 ERR_NBASE_MBP_P2 "D$%?D!H C$PID$ JK#B "#HLHDBW 2-73...–80 HNHM% -81 ERR_KEYFILE_NOT_FOUND #"F#"#%FH# Q?OP " >PWA?G! ] /] -82 ERR_READING_KEYFILE S!J>? A#HD!@ Q?OP? >PWAHO -83 ERR_PARFILE_NOT_FOUND #"F#"#%FH# Q?OP " L?M?GH#M?G! sPRPERS.PAR -84 ERR_BAD_NUM_OF_PARAM S!J$AD$H A!"P$ L?M?GH#M$% % Q?OPH sPRPERS.PAR -85 ERR_BAD_PARAM_FMT H%HMDKH ND?AHD!@ L?M?GH#M$% % Q?OPH sPRPERS.PAR -86 ERR_BAD_CA_ID_FMT H%HMD$H ND?AHD!H !CHD#!Q!>?#$M? ] -87 ERR_BAD_ISS_ID_FMT H%HMD$H ND?AHD!H !CHD#!Q!>?#$M? iG!#HD#? -88 ERR_CRTFILE_NOT_FOUND #"F#"#%FH# Q?OP " "HM#!Q!>?#$G $#>MK#$E$ >PWA? iG!#HD#? -89 ERR_CRT_ISS_NOT_CMP CHD#!Q!>?#$M iG!#HD#? DH "$%L?C?H# " F>?N?DDKG % "HM#!Q!>?#H -90 ERR_CRT_DATE_EXPIRED "#H> "M$> CHO"#%!@ "HM#!Q!>?#?DSSSCT File : ccrt_pg.doc Ref : CHKCERTPG0000 Revision:2.0 12 / 18 Copyright © Dekart S.R.L (www.dekart.com) - 2001 This document shall not be disclosed to a third party without prior written consent of Dekart S.R.L. !>?>?@ A?"#B C?DD$E$ C$>FGHD#? DH G$IH# JK#B %$"LM$!N%HCHD? % >?>$O JK #$ D! JKP$ Q$MGH ! >?>!G! JK, #$ D! JKP$ "MHC"#%?G! JHN L!"BGHDD$E$ M?NMHSHD!@ %P?CHPBT? ?%#$M">!U LM?%. @ A .
  • -91 ERR_CRT_CA_NOT_CMP CHD#!Q!>?#$M iG!#HD#? DH "$%L?C?H# " F>?N?DDKG % "HM#!Q!>?#H -92 ERR_CRT_LEN H%HMD?@ CP!D? "HM#!Q!>?#? -93 ERR_BAD_PUBLIC_LEN H%HMD?@ CP!D? $#>MK#$E$ >PWA? ] -94 ERR_AUTH_ALG_UNKNOWN H!N%H"#DKO ?PE$M!#G ?F#HD#!Q!>?T!! -95 ERR_INV_LUHN_CODE HLM?%!PBD$H ND?AHD!H luhn->$C? -96 ERR_NOT_FREE_MEM HC$"#?#$AD$ "%$J$CD$E$ GH"#? -97 ERR_TRANS_KEY_VERIFY S!J>? %HM!Q!>?T!! #M?D"L$M#D$E$ >PWA? -98 ERR_CREATE_CARDFILE S!J>? LM! "$NC?D!! Q?OP? D? >?M#H -99 ERR_WRITE_CARD_FILE S!J>? N?L!"! Q?OP? D? >?M#F -100 ERR_BAD_IDENT_CONTENT H%HMD$H "$CHMI!G$H Q?OP? 8000 D? >?M#H -123 ERR_NOT_INITIALIZED H JKP? %KL$PDHD? $LHM?T!@ !D!T!?P!N?T!! LM$TH""? -125 ERR_FUNC_NOT_RELEASED -126 ERR_USR_ABORT ?J$#? LM$EM?GGK $"#?D$%PHD? L$PBN$%?#HPHG /* Rest of CT-API */ -127 ERR_CT_API_ABORT ?J$#? LM$EM?GGK $"#?D$%PHD? "HM%HM$G -128 ERR_CT_API_HTSI S!J>? D!IDHE$ FM$%D@ 4.2. A ! " A (Borland C++ v.5.01)//----------------------------------------------------------------------------// Test BC++ built 32-bit DLLs (Example of ChkCert.DLL call).//// Copyright (c) Dekart Ltd. All Rights Reserved//// This application tests calling into a 32-bit DLL built with Borland C++.// Code was verified with Borland C++ 5.02////----------------------------------------------------------------------------#include <windows.h>#include <stdio.h> // stdio.h#include <stdlib.h>#include <conio.h>#include <sys/stat.h>#include <io.h>#include <dir.h>#include <fstream.h>#include <string.h>#include "ChkCert.h" // functions from ChkCert.dllchar Dll[] = "ChkCert.dll";int (__stdcall *pOpenChkSession)(char *Port, short ReaderType, char *Iss_KeyFile, char *PIN, char *IccNo);DSSSCT File : ccrt_pg.doc Ref : CHKCERTPG0000 Revision:2.0 13 / 18 Copyright © Dekart S.R.L (www.dekart.com) - 2001 This document shall not be disclosed to a third party without prior written consent of Dekart S.R.L. !>?>?@ A?"#B C?DD$E$ C$>FGHD#? DH G$IH# JK#B %$"LM$!N%HCHD? % >?>$O JK #$ D! JKP$ Q$MGH ! >?>!G! JK, #$ D! JKP$ "MHC"#%?G! JHN L!"BGHDD$E$ M?NMHSHD!@ %P?CHPBT? ?%#$M">!U LM?%. @ A .
  • void (__stdcall *pCloseChkSession)(void);int (__stdcall *pChkCert)(char Type, char *Rnd, char *Amn, char *CurTrno,char *Crt, char *SerNo);int (__stdcall *pChkSCert)(char Type, char *Rnd, char *Amn, char*CurTrno, char *Crt, char *SerNo);///////////////////////////////////////////////////////////////////////////////int main(int argc, char *argv[]){ int status, i; short reader; char rnd[17]=" ", crt[13]=" ", cur[5]=" "; char rnd1[17]=" ", crt1[13]=" ", rnd2[17]=" ", crt2[13]=" "; long int sum1=0; char sum[10]=" "; char port[20]=" "; char cardnum[33]=" "; FILE *filei; // // Load the Dynamic Link LIbrary ChkCert.dll // HINSTANCE hLib = LoadLibrary(Dll); if ( (unsigned)hLib <= HINSTANCE_ERROR ) { printf("Failure loading library: %sn", Dll); return 0; } // // Get all the entry points for the functions we wish to test. Typedefs can // be used to simplify casting the retrun value from GetProcAddress. // pOpenChkSession = (int(__stdcall*)(char *Port, short ReaderType, char *Iss_KeyFile, char *PIN, char *IccNo)) GetProcAddress(hLib, "OpenChkSession"); pCloseChkSession = (void(__stdcall*)(void)) GetProcAddress(hLib, "CloseChkSession"); pChkCert = (int(__stdcall*)(char Type, char *Rnd, char *Amn, char *CurTrno, char*Crt, char *SerNo))GetProcAddress(hLib, "ChkCert"); pChkSCert = (int(__stdcall*)(char Type, char *Rnd, char *Amn, char *CurTrno, char *Crt,char *SerNo))GetProcAddress(hLib, "ChkSCert"); // // GetProcAddress returns null on failure // if( pChkSCert == NULL || pOpenChkSession == NULL || pCloseChkSession == NULL ||pChkCert == NULL ) { printf("Failure locating procedures.n"); return 0; }// PORT - name of com-port connected to reader// READER - reader type// PIN - PIN-code to access card// CUR - currency type// SUM - sum// RND - random sequence// CARDNUM - card serial number// CRT - certificate value//// Open Certificate Verification session// printf("n Open Certificate Verification session for 94980001 issuern");// Keys Reading printf("n Input Acces Card in Reader"); getch(); status = pOpenChkSession("COM2",0,"94980001.se2", "1111",cardnum); if (status != OK) { printf("n Error: %dn", status); return 0; } else{ printf("n Status: %dn", status);DSSSCT File : ccrt_pg.doc Ref : CHKCERTPG0000 Revision:2.0 14 / 18 Copyright © Dekart S.R.L (www.dekart.com) - 2001 This document shall not be disclosed to a third party without prior written consent of Dekart S.R.L. !>?>?@ A?"#B C?DD$E$ C$>FGHD#? DH G$IH# JK#B %$"LM$!N%HCHD? % >?>$O JK #$ D! JKP$ Q$MGH ! >?>!G! JK, #$ D! JKP$ "MHC"#%?G! JHN L!"BGHDD$E$ M?NMHSHD!@ %P?CHPBT? ?%#$M">!U LM?%. @ A .
  • printf(" CardNum: %sn", cardnum); }// ===========================================// Certificate Verification Tests// ===========================================// Card with mask S//-------------------------------------------- printf("nCard with mask Sn");//// Debit Certificate Verification Test// printf("nCheck Debit Certificate...n"); filei=fopen("debit","r"); for(i=0; i<6; i++) { fscanf(filei,"%s",&cardnum); fscanf(filei,"%s",&sum); fscanf(filei,"%s",&cur); fscanf(filei,"%s",&rnd); fscanf(filei,"%s",&crt); printf("n %s %s %s %s %s", rnd, sum, cur, crt, cardnum); status = pChkSCert(P, rnd, sum, cur, crt, cardnum); if (status == 1) { printf("ntCertificate is TRUEn"); } else { if (status == 0) printf("ntCertificate is FALSEn"); else printf("Error: %dn", status); }}fclose(filei);//// Credit Certificate Verification Test// printf("nCheck Credit Certificate...n"); filei=fopen("credit","r"); for(i=0; i<6; i++) { fscanf(filei,"%s",&cardnum); fscanf(filei,"%s",&sum); fscanf(filei,"%s",&cur); fscanf(filei,"%s",&rnd1); fscanf(filei,"%s",&crt1); fscanf(filei,"%s",&rnd2); fscanf(filei,"%s",&crt2); printf("n %s %s %s %s %s ", rnd1, sum, cur, crt1, cardnum); status = pChkSCert(R, rnd1, sum, cur, crt1, cardnum); if (status == 1) { printf("ntCertificate is TRUEn"); } else { if (status == 0) printf("ntCertificate is FALSEn"); else printf("Error: %dn", status); }}fclose(filei);//----------------------------// Card without mask S//---------------------------- printf("nCard without mask Sn");//DSSSCT File : ccrt_pg.doc Ref : CHKCERTPG0000 Revision:2.0 15 / 18 Copyright © Dekart S.R.L (www.dekart.com) - 2001 This document shall not be disclosed to a third party without prior written consent of Dekart S.R.L. !>?>?@ A?"#B C?DD$E$ C$>FGHD#? DH G$IH# JK#B %$"LM$!N%HCHD? % >?>$O JK #$ D! JKP$ Q$MGH ! >?>!G! JK, #$ D! JKP$ "MHC"#%?G! JHN L!"BGHDD$E$ M?NMHSHD!@ %P?CHPBT? ?%#$M">!U LM?%. @ A .
  • // Debit Certificate Verification Test// printf("nCheck Debit Certificate...n"); filei=fopen("debit.dat","r"); for(i=0; i<6; i++) { fscanf(filei,"%s",&cardnum); fscanf(filei,"%s",&sum); fscanf(filei,"%s",&cur); fscanf(filei,"%s",&rnd); fscanf(filei,"%s",&crt); printf("n %s %s %s %s %s", rnd, sum, cur, crt, cardnum); status = pChkCert(P, rnd, sum, cur, crt, cardnum); if (status == 1) { printf("ntCertificate is TRUEn"); } else { if (status == 0) printf("ntCertificate is FALSEn"); else printf("Error: %dn", status); }}fclose(filei);//// Credit Certificate Verification Test// printf("nCheck Credit Certificate...n"); filei=fopen("credit.dat","r"); for(i=0; i<6; i++) { fscanf(filei,"%s",&cardnum); fscanf(filei,"%s",&sum); fscanf(filei,"%s",&cur); fscanf(filei,"%s",&rnd1); fscanf(filei,"%s",&crt1); fscanf(filei,"%s",&rnd2); fscanf(filei,"%s",&crt2); printf("n %s %s %s %s %s ", rnd1, sum, cur, crt1, cardnum); status = pChkCert(R, rnd1, sum, cur, crt1, cardnum); if (status == 1) { printf("ntCertificate is TRUEn"); } else { if (status == 0) printf("ntCertificate is FALSEn"); else printf("Error: %dn", status); }}fclose(filei); // // Close Certificate Verification session // printf("Close Certificate Verification session for 99800001 issuern"); pCloseChkSession(); printf("n"); if((unsigned)hLib>HINSTANCE_ERROR) FreeLibrary(hLib); cout <<"done." <<endl; return 1;} 4.3. # A A ! "DSSSCT File : ccrt_pg.doc Ref : CHKCERTPG0000 Revision:2.0 16 / 18 Copyright © Dekart S.R.L (www.dekart.com) - 2001 This document shall not be disclosed to a third party without prior written consent of Dekart S.R.L. !>?>?@ A?"#B C?DD$E$ C$>FGHD#? DH G$IH# JK#B %$"LM$!N%HCHD? % >?>$O JK #$ D! JKP$ Q$MGH ! >?>!G! JK, #$ D! JKP$ "MHC"#%?G! JHN L!"BGHDD$E$ M?NMHSHD!@ %P?CHPBT? ?%#$M">!U LM?%. @ A .
  • ?DDKH ‡1 Open Certificate Verification session for 94980001 issuer Input Acces Card in Reader Status: 1 CardNum: 0000BBE701000200Card with mask SCheck Debit Certificate... DCDE889CE369945C 1 498 4150643A700F 0000003600FFFF02 Certificate is TRUE 9190076FFA74D2A0 5 498 CC8EA644CF2D 0000003600FFFF02 Certificate is TRUE 958A40A95B06A80D 1 500 71D71ED79633 0000003600FFFF02 Certificate is TRUE 62900EC0D0901317 5 500 F18B81BAA684 0000003600FFFF02 Certificate is TRUE 89A4C22985DB7F29 1 980 FFBB4AC78A1A 0000003600FFFF02 Certificate is TRUE A8B0D3782BE274C2 5 980 1F83431FA68F 0000003600FFFF02 Certificate is TRUECheck Credit Certificate... 720CA3B7384D2097 1 0001 33E890158197 0000003600FFFF02 Certificate is TRUE DFED447BFAE64E24 5 0002 B89154009E17 0000003600FFFF02 Certificate is TRUE 4023084D90EACF81 1 0002 155BB6FAC88C 0000003600FFFF02 Certificate is TRUE 1CA845BE5A42120B 5 0003 E3F7228567B1 0000003600FFFF02 Certificate is TRUE D0A747F0D330C587 1 0001 B1E3F2C3DA4F 0000003600FFFF02 Certificate is TRUE 5D4EFB86CBD1D0EE 5 0002 EAEB1B56B397 0000003600FFFF02 Certificate is TRUECard without mask SCheck Debit Certificate... F0AD2A0B245299FA 1 498 D8AA3068FFE2 000001C4E4000000 Certificate is TRUE 1B71B13830407EAF 5 498 8FEA6CFEE19F 000001C4E4000000 Certificate is TRUEDSSSCT File : ccrt_pg.doc Ref : CHKCERTPG0000 Revision:2.0 17 / 18 Copyright © Dekart S.R.L (www.dekart.com) - 2001 This document shall not be disclosed to a third party without prior written consent of Dekart S.R.L. !>?>?@ A?"#B C?DD$E$ C$>FGHD#? DH G$IH# JK#B %$"LM$!N%HCHD? % >?>$O JK #$ D! JKP$ Q$MGH ! >?>!G! JK, #$ D! JKP$ "MHC"#%?G! JHN L!"BGHDD$E$ M?NMHSHD!@ %P?CHPBT? ?%#$M">!U LM?%. @ A .
  • 0C2B3F2293AEE571 1 500 C1C5D7062584 000001C4E4000000 Certificate is TRUE DD44E62FE9EC41EE 5 500 F60227AAFC1D 000001C4E4000000 Certificate is TRUE 0005269C5CF53293 1 980 801686609B01 000001C4E4000000 Certificate is TRUE 98BF33D48D883E75 5 980 08DF74441488 000001C4E4000000 Certificate is TRUECheck Credit Certificate... 55B821AC2B612EFA 1 0020 CA548B5A0B00 000001C4E4000000 Certificate is TRUE 18D4861D27BB558A 5 0021 B8A5D2820437 000001C4E4000000 Certificate is TRUE 925BA7644D084B46 1 0019 BD0B3FBFD1B4 000001C4E4000000 Certificate is TRUE 718EC98A94817DAC 5 001A BBE3B2BA58F1 000001C4E4000000 Certificate is TRUE ?DDKH ‡2 Open Certificate Verification session for 94980001 issuerInput Acces Card in ReaderStatus: 1CardNum: 0000BBE701000200Card with mask SCheck Credit Certificate... 720CA3B7384D2097 10 0001 33E890158197 0000003600FFFF02 Certificate is FALSE !"# . KCHPHDDKG SM!Q#$G L$>?N?DK !"U$CD?@ ! !">?IHDD?@ #M?DN?>T!!.DSSSCT File : ccrt_pg.doc Ref : CHKCERTPG0000 Revision:2.0 18 / 18 Copyright © Dekart S.R.L (www.dekart.com) - 2001 This document shall not be disclosed to a third party without prior written consent of Dekart S.R.L. !>?>?@ A?"#B C?DD$E$ C$>FGHD#? DH G$IH# JK#B %$"LM$!N%HCHD? % >?>$O JK #$ D! JKP$ Q$MGH ! >?>!G! JK, #$ D! JKP$ "MHC"#%?G! JHN L!"BGHDD$E$ M?NMHSHD!@ %P?CHPBT? ?%#$M">!U LM?%. @ A .