JWorld@TW the best professional Java site in Taiwan
      註冊 | 登入 | 全文檢索 | 排行榜  

» JWorld@TW » Java ME、Google Android 平台與 JavaCard 討論區 » Java Card  

按列印兼容模式列印這個話題 列印話題    把這個話題寄給朋友 寄給朋友    訂閱主題
reply to topicthreaded modego to previous topicgo to next topic
本主題所含的標籤
無標籤
作者 [PC/SC 範例程式] 使用自然人憑證卡片 [精華]
andyhua



版主

發文: 624
積分: 1
於 2005-04-18 14:04 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
所附之PC/SC 範例程式為"使用自然人憑證卡片"

其中有兩個 API samples:
1. Getcardserialnumber : 讀取自然人憑證卡片之序號(卡片上有印)
2. Readcertificate: 讀取自然人憑證卡片之簽章資料

enjoy it!

MOICAsample.zip (13.35k)


reply to postreply to post
-----------------------------------------------------------------
作者 Re:[PC/SC 範例程式] 使用自然人憑證卡片 [Re:andyhua]
viva





發文: 18
積分: 0
於 2005-04-19 08:17 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
感恩阿~^^
又有範例可以學習嚕


reply to postreply to post
作者 Re:[PC/SC 範例程式] 使用自然人憑證卡片 [Re:andyhua]
mrbig





發文: 28
積分: 0
於 2005-04-24 02:50 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
請問一下,哪裡可以取得自然人憑證所有的APDU command啊?
還是只能用中華電信那個API?


reply to postreply to post
作者 Re:[PC/SC 範例程式] 使用自然人憑證卡片 [Re:mrbig]
andyhua



版主

發文: 624
積分: 1
於 2005-04-24 10:52 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
mrbig wrote:
請問一下,哪裡可以取得自然人憑證所有的APDU command啊?
還是只能用中華電信那個API?


目前只有中華電信API


reply to postreply to post
-----------------------------------------------------------------
作者 Re:[PC/SC 範例程式] 使用自然人憑證卡片 [Re:andyhua]
kogrs





發文: 40
積分: 0
於 2005-05-20 09:43 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
走 pkcs11 的方式可以不用中華電信的api

reply to postreply to post
作者 Re:[PC/SC 範例程式] 使用自然人憑證卡片 [Re:andyhua]
raincaller





發文: 20
積分: 0
於 2005-06-04 11:28 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
andyhua wrote:
所附之PC/SC 範例程式為"使用自然人憑證卡片"

其中有兩個 API samples:
1. Getcardserialnumber : 讀取自然人憑證卡片之序號(卡片上有印)
2. Readcertificate: 讀取自然人憑證卡片之簽章資料

enjoy it!


andyhua大
這是C寫的程式嗎??不知道有沒有java版的可以研究


reply to postreply to post
作者 Re:[PC/SC 範例程式] 使用自然人憑證卡片 [Re:raincaller]
andyhua



版主

發文: 624
積分: 1
於 2005-06-05 14:27 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
raincaller wrote:
這是C寫的程式嗎??不知道有沒有java版的可以研究


是的! 這是 VC 的範例, 目前還沒 java 版的,
看看哪位版友有興趣改寫一下Blush


reply to postreply to post
-----------------------------------------------------------------
作者 Re:[PC/SC 範例程式] 使用自然人憑證卡片 [Re:andyhua]
cuteneko





發文: 2
積分: 0
於 2005-07-14 11:09 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
請問自然人憑證卡片是JavaCard嗎?

reply to postreply to post
作者 Re:[PC/SC 範例程式] 使用自然人憑證卡片 [Re:andyhua]
pkcs





發文: 2
積分: 0
於 2005-07-14 15:46 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
不是!!

reply to postreply to post
作者 Re:[PC/SC 範例程式] 使用自然人憑證卡片 [Re:andyhua]
sidneykuo





發文: 25
積分: 0
於 2005-09-29 00:29 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
Hi , 版主你好
我執行了你的demo ap之後,出現如附圖Dead,但是我有改成我的card reader也是
fail,不知是我是否要換成跟你相同的card reader 或者要做什麼設定才可以讀,
謝謝...Shock


reply to postreply to post
不求移開難處,只求恩典加多
作者 Re:[PC/SC 範例程式] 使用自然人憑證卡片 [Re:andyhua]
sidneykuo





發文: 25
積分: 0
於 2005-09-29 13:24 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
Hi , 版主
不好意思,再跟您確認一下,要執行你的demo程式,是否要先安裝中華電信的API才可以執行(尚在申請中),還需要其它設定嗎?


reply to postreply to post
不求移開難處,只求恩典加多
作者 Re:[PC/SC 範例程式] 使用自然人憑證卡片 [Re:sidneykuo]
andyhua



版主

發文: 624
積分: 1
於 2005-09-29 14:06 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
sidneykuo wrote:
Hi , 版主
不好意思,再跟您確認一下,要執行你的demo程式,是否要先安裝中華電信的API才可以執行(尚在申請中),還需要其它設定嗎?


是的~~
你必須要先將自然人憑證卡片的 ATR 註冊給 OS. 如下圖:
這樣程式才認得自然人憑證卡{STARCOS SPK 2.3}

(縮略圖,點擊圖片鏈接看原圖)


reply to postreply to post
-----------------------------------------------------------------
作者 Re:[PC/SC 範例程式] 使用自然人憑證卡片 [Re:sidneykuo]
andyhua



版主

發文: 624
積分: 1
於 2005-09-29 14:07 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
sidneykuo wrote:
Hi , 版主
不好意思,再跟您確認一下,要執行你的demo程式,是否要先安裝中華電信的API才可以執行(尚在申請中),還需要其它設定嗎?


不需要先安裝中華電信的API~~


reply to postreply to post
-----------------------------------------------------------------
作者 Re:[PC/SC 範例程式] 使用自然人憑證卡片 [Re:sidneykuo]
andyhua



版主

發文: 624
積分: 1
於 2005-09-29 14:14 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
sidneykuo wrote:
Hi , 版主你好
我執行了你的demo ap之後,出現如附圖Dead,但是我有改成我的card reader也是
fail,不知是我是否要換成跟你相同的card reader 或者要做什麼設定才可以讀,
謝謝...Shock


正確執行的畫面如下:


reply to postreply to post
-----------------------------------------------------------------
作者 Re:[PC/SC 範例程式] 使用自然人憑證卡片 [Re:andyhua]
sidneykuo





發文: 25
積分: 0
於 2005-09-29 15:35 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
版主....|||_||| m

我依照你的指示,至regedit中去設定了機碼之後,執行之後確出現這個結果,~_~
我想是不是和讀卡機有相關呢?


reply to postreply to post
不求移開難處,只求恩典加多
作者 Re:[PC/SC 範例程式] 使用自然人憑證卡片 [Re:andyhua]
sidneykuo





發文: 25
積分: 0
於 2005-09-29 15:37 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
版主....|||_||| m

我依照你的指示,至regedit中去設定了機碼之後,執行之後確出現這個結果,~_~
我想是不是和讀卡機有相關呢?


reply to postreply to post
不求移開難處,只求恩典加多
作者 Re:[PC/SC 範例程式] 使用自然人憑證卡片 [Re:andyhua]
sidneykuo





發文: 25
積分: 0
於 2005-09-29 15:41 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
抱歉,好像一次只可以上傳一張,第二個圖是小第的regstry,用了插入多張圖的功能出現了nullPointerException...

reply to postreply to post
不求移開難處,只求恩典加多
作者 Re:[PC/SC 範例程式] 使用自然人憑證卡片 [Re:sidneykuo]
andyhua



版主

發文: 624
積分: 1
於 2005-09-29 17:21 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
sidneykuo wrote:
版主....|||_||| m

我依照你的指示,至regedit中去設定了機碼之後,執行之後確出現這個結果,~_~
我想是不是和讀卡機有相關呢?


這是SCardConnect的問題,
程式的 SCardConnect 參數2 改為:

1
2
3
4
5
6
7
8
9
10
SEND_SCCOMMAND:
 
  // Connect to SmartCard
  lReturn = SCardConnect ( hSC,
               TEXT(rgscState[dwI].szReader),
               SCARD_SHARE_SHARED,
               SCARD_PROTOCOL_T1|SCARD_PROTOCOL_T0,
               &hCardHandle,
               &dwActiveProtocol 
               );


reply to postreply to post
-----------------------------------------------------------------
作者 Re:[PC/SC 範例程式] 使用自然人憑證卡片 [Re:andyhua]
sidneykuo





發文: 25
積分: 0
於 2005-09-29 18:22 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
Hi , 版主
感謝,我己經試出來了,要改reader 的名稱

  lReturn = SCardConnect ( hSC,
_T("THRC USB Smart Card Reader 0"),
SCARD_SHARE_SHARED,
SCARD_PROTOCOL_T1|SCARD_PROTOCOL_T0,
&hCardHandle,
&dwActiveProtocol
);

感謝~Big Smile


reply to postreply to post
不求移開難處,只求恩典加多
作者 Re:[PC/SC 範例程式] 使用自然人憑證卡片 [Re:andyhua]
sidneykuo





發文: 25
積分: 0
於 2005-10-02 23:10 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
Hi , 版主
請教你一個問題:
APDU Command是依IC Card種類分還是依Card Reader分呢?
謝謝~


reply to postreply to post
不求移開難處,只求恩典加多
作者 Re:[PC/SC 範例程式] 使用自然人憑證卡片 [Re:sidneykuo]
andyhua



版主

發文: 624
積分: 1
於 2005-10-03 10:19 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
sidneykuo wrote:
Hi , 版主
請教你一個問題:
APDU Command是依IC Card種類分還是依Card Reader分呢?
謝謝~


APDU Command 是下給 smart card 的,
所以跟 card 有關, reader 只是負責送收 APDU command 的載具~~


reply to postreply to post
-----------------------------------------------------------------
作者 Re:[PC/SC 範例程式] 使用自然人憑證卡片 [Re:andyhua]
barlino





發文: 1
積分: 0
於 2006-09-01 15:19 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
您好

公司有申請了中華電信的API,裡頭有LINUX的API,但是卻沒有最重要的Card Handler Function.

而我看到此討論串,有版主的DEMO範例如下:

lReturn = SCardConnect ( hSC,
_T("THRC USB Smart Card Reader 0"),
SCARD_SHARE_SHARED,
SCARD_PROTOCOL_T1|SCARD_PROTOCOL_T0,
&hCardHandle,
&dwActiveProtocol
);

此程式碼的 hCardHandle是讀卡機的一各控制項,我想請問此控制項能否與中華電信的API做結合,謝謝


reply to postreply to post
作者 Re:[PC/SC 範例程式] 使用自然人憑證卡片 [Re:andyhua]
johnrock





發文: 1
積分: 0
於 2011-04-02 10:56 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
還要把115行刪除或註解起來
1
               //SCardFreeMemory( hSC, szReaders );


andyhua wrote:
這是SCardConnect的問題,
程式的 SCardConnect 參數2 改為:

1
2
3
4
5
6
7
8
9
10
SEND_SCCOMMAND:
 
  // Connect to SmartCard
  lReturn = SCardConnect ( hSC,
               TEXT(rgscState[dwI].szReader),
               SCARD_SHARE_SHARED,
               SCARD_PROTOCOL_T1|SCARD_PROTOCOL_T0,
               &hCardHandle,
               &dwActiveProtocol 
               );



reply to postreply to post
» JWorld@TW »  Java ME、Google Android 平台與 JavaCard 討論區 » Java Card

reply to topicthreaded modego to previous topicgo to next topic
  已讀文章
  新的文章
  被刪除的文章
Jump to the top of page

JWorld@TW 本站商標資訊

Powered by Powerful JuteForum® Version Jute 1.5.8