Bu sayfanın seçili sürümü ile mevcut sürümü arasındaki farkları gösterir.
en:esya:smartcard:karta-erisim [2013/09/11 12:59] Dindar Öz oluşturuldu |
en:esya:smartcard:karta-erisim [2013/09/12 06:33] (mevcut) Dindar Öz |
||
---|---|---|---|
Satır 1: | Satır 1: | ||
===== Accessing Smartcard ===== | ===== Accessing Smartcard ===== | ||
- | ''SmartCard'' sınıfı akıllı kart ile ilgili işlemlerden sorumlu sınıftır. ''SmartCard'' sınfının çalıştırılabilmesi için hangi akıllı kartın kullanıldığının bilinmesi gerekmektedir. Çünkü akıllı kart işlemleri akıllı kartın sürücüsü üzerinden yapılmaktadır. Java 6 ile java kütüphaneleri kullanılarak kart bilgilerine erişilip hangi kart olduğu belirlenebilmektedir. Java 5 ve .NET'te ise hangi akıllı kartın kullanıldığı bilinmelidir. | + | ''SmartCard'' is responsible for smartcard operations. To use ''Smartcard'', the brand of the must be specified since it operates by using the smartcard driver. On Java 6, the type of the smartcard can be detected via java libraries. As for Java 5 and .NET this information must be provided by the user. |
- | Java 6 için ''SmartOp'' sınıfının ''findCardTypeAndSlot()'' fonksiyonu ile kartın slot numarası ve kart tipi bulunabilmektedir. Eğer bilgisayara bir akıllı kart takılı ise fonksiyon doğrudan bu kartın bilgilerini dönecektir. Eğer birden fazla akıllı kart takılı ise ''javax.swing.JOptionPane'' ile kullanıcıya akıllı kartlardan biri seçtirilecektir. | + | On Java 6,the method ''findCardTypeAndSlot()'' of ''SmartOp'' finds the card type and slot number. If only single card is plugged in then this function immediately return the card information whereas it shows ''javax.swing.JOptionPane'' to the user to select one of the cards when multiple smartcards are plugged in. |
<sxh java;title:Java 6 ve C#> | <sxh java;title:Java 6 ve C#> | ||
Satır 12: | Satır 12: | ||
</sxh> | </sxh> | ||
- | Eğer görsel bir arayüzün API tarafından gösterilmesini istemiyorsanız; ''SmartOp'' sınıfının ''getCardTerminals()'' fonksiyonu ile akıllı kart okuyucularının isimlerini alabilirsiniz. Bu isimler ile kartı kullanıcıya seçtirdikten sonra ''getSlotAndCardType(String terminal)'' fonksiyonuyla kullanıcının seçtiği kartın slot numarası ve kart tipi alınabilir. | + | Alternatively, the method ''getCardTerminals()'' of ''SmartOp'' returns the names of smartcard readers. By using these names the correct card is acquired from the user and then by calling ''getSlotAndCardType(String terminal)'' the type and slot number of that card can be obtained. |
- | Eğer kullanıcıya kart tipine göre akıllı kartı seçtirmek isteniyorsa, ''SmartOp'' sınıfının ''findCardTypesAndSlots()'' ile bağlı olan bütün kartların slot numaralarını ve kart tiplerini alabilirsiniz. | + | If the selection is performed according to the card type, the method ''findCardTypesAndSlots()'' of ''SmartOp'' can be used to collect slot numbers and types of all cards currently plugged in. |
- | Java 5 ve .NET'te ise akıllı kartın türü bilinmelidir. Aşağıdaki örnek kodda herhangi bir seçim yapılmadan birinci karta oturum açılmaktadır. ''SmartCard'' sınıfının ''getSlotInfo(Long slot)'' fonksiyonu ile slot hakkındaki bilgiler edinilebilir, buradaki slot tanımlamasıyla kullanıcıdan kart seçmesi istenebilir. | + | As for Java 5 and .NET, the type of the smartcard must be known in advance. In the sample code below, without any selection, a session is opened in the first card. The method ''getSlotInfo(Long slot)'' of ''SmartCard'' returns information about the given slot. The user can be prompted to choose a card with the information returned by this function. |
- | Akıllı kart ile işlem yapmaya başlamak için ''openSession()'' fonksiyonu ile oturum açılmalıdır. Karttan sertifika okumak için login olmaya gerek yoktur. Yalnız imza atma veya şifre çözme işlemi yapılacaksa karta login olunmalıdır. | + | |
+ | In order to start a smartcard operation, a session must be opened by ''openSession()''. Reading a certificate from a smartcard does not require login. Signing and decryption operations requires login as these operations need private key access. | ||
<sxh java;title:Java 5-6 ve C#> | <sxh java;title:Java 5-6 ve C#> | ||
Satır 28: | Satır 29: | ||
</sxh> | </sxh> | ||
- | ==== Akis Kartlara Erişim ==== | + | ==== Accessing Akis Card ==== |
- | Java 6 kullanıldığında akis kartlara, Akis'in java kütüphanesi kullanılarak komut (APDU) gönderilebilmektedir. Sistemde akis sürücüsü yüklü olmasa bile AkisCIF.x.x.x.jar oldugunda karta erişilmektedir. AkisCIF üzerinden akıllı karta erişmek, akıllı kart işlemlerinin süresini dolayısıyla imza süresini kısaltmaktadır. Yalnız AkisCIF üzerinden karta erişildiğinde diğer programlar karta erişememektedir. Yeni sürüm akis kart kullanmaya başladığınızda AkisCIF'i de yenilemeniz gerekecektir. | + | On Java 6, it is possible with java library to work with AKIS cards by sending APDU commands. Even if AKIS driver does not exist in the system, the card can be accessed with AkisCIF.x.x.x.jar. Using AkisCIF makes card operations faster and shortens the signature creation time. A drawback o f using AkisCIF is that it locks the card such that no other program can use card during its operation. AkisCIF must be updated whenever the card version is changed. |
- | Akıllı karta APDU komutları ile AkisCIF.x.x.x.jar üzerinden erişilmesinden ''APDUSmartCard'' sınıfı sorumludur. Örnek bir kullanım aşağıdaki gibidir. | + | ''APDUSmartCard'' is responsible for accessing smartcard via APDU commands using AkisCIF.x.x.x.jar. |
+ | A sample usage is as follows: | ||
<sxh java;title:Java 6> | <sxh java;title:Java 6> | ||
Satır 45: | Satır 47: | ||
</sxh> | </sxh> | ||
- | Yukarıda da belirtildiği gibi AkisCIF arayüzü bütün kartları desteklemeyebilir. AkisCIF desteklendiğinde AkisCIF ile desteklenmediğinde dll ile işlemlerinizi yapmak için aşağıdaki şekilde kullanabilirsiniz. | + | As mentioned above, AkisCIF may not support all card types. To use AkisCIF if supported and use driver dll if not ,you can use the following code: |
<sxh java;title:Java 6> | <sxh java;title:Java 6> |