tr.gov.tubitak.uekae.esya.api.smartcard.pkcs11.card.ops
Interface IPKCS11Ops


public interface IPKCS11Ops


Method Summary
 void changePassword(java.lang.String aOldPass, java.lang.String aNewPass, long aSessionID)
           
 void changeUserPin(byte[] aSOPin, byte[] aUserPin, long aSessionHandle)
           
 void closeSession(long aSessionID)
           
 void createRSAKeyPair(long aSessionID, java.lang.String aKeyLabel, int aModulusBits, boolean aIsSign, boolean aIsEncrypt)
           
 byte[] decryptData(long aSessionID, java.lang.String aKeyLabel, byte[] aData, long aMechanism)
           
 byte[] decryptDataWithCertSerialNo(long aSessionID, byte[] aSerialNumber, long aMechanism, byte[] aData)
           
 void deletePrivateData(long aSessionID, java.lang.String aLabel)
           
 void deletePrivateObject(long aSessionID, java.lang.String aLabel)
           
 void deletePublicData(long aSessionID, java.lang.String aLabel)
           
 void deletePublicObject(long aSessionID, java.lang.String aLabel)
           
 byte[] encryptData(long aSessionID, java.lang.String aKeyLabel, byte[] aData, long aMechanism)
           
 void formatToken(java.lang.String aSOpin, java.lang.String aNewPIN, java.lang.String aLabel, int slotID)
           
 java.util.List<byte[]> getEncryptionCertificates(long aSessionID)
           
 java.lang.String[] getEncryptionKeyLabels(long aSessionID)
           
 long[] getMechanismList(long aSlotID)
           
 byte[] getRandomData(long aSessionID, int aDataLength)
           
 sun.security.pkcs11.wrapper.CK_SESSION_INFO getSessionInfo(long aSessionID)
           
 java.util.List<byte[]> getSignatureCertificates(long aSessionID)
           
 java.lang.String[] getSignatureKeyLabels(long aSessionID)
           
 sun.security.pkcs11.wrapper.CK_SLOT_INFO getSlotInfo(long aSlotID)
           
 long[] getSlotList()
           
 sun.security.pkcs11.wrapper.CK_TOKEN_INFO getTokenInfo(long aSlotID)
           
 long[] getTokenPresentSlotList()
           
 byte[] getTokenSerialNo(long aSlotID)
           
 void importCertificate(long aSessionID, java.lang.String aCertLabel, java.security.cert.X509Certificate aSertifika)
           
 void importCertificateAndKey(long aSessionID, java.lang.String aCertLabel, java.lang.String aKeyLabel, java.security.PrivateKey aPrivKey, java.security.cert.X509Certificate aCert)
           
 boolean importCertificateAndKeyWithCSP(byte[] aAnahtarCifti, int aAnahtarLen, java.lang.String aScfname, java.lang.String aContextName, byte[] aPbCertData, int aSignOrEnc)
           
 boolean importCertificateAndKeyWithCSP(byte[] aAnahtarCifti, int aAnahtarLen, java.lang.String aScfname, java.lang.String aContextName, java.security.cert.X509Certificate aPbCertData, int aSignOrEnc)
           
 void importRSAKeyPair(long aSessionID, java.lang.String aLabel, java.security.interfaces.RSAPrivateCrtKey aPrivKey, byte[] aSubject, boolean aIsSign, boolean aIsEncrypt)
           
 void initialize()
           
 boolean isAnyObjectExist(long aSessionID)
           
 boolean isCertificateExist(long aSessionID, java.lang.String aLabel)
           
 boolean isObjectExist(long aSessionID, java.lang.String aLabel)
           
 boolean isPrivateKeyExist(long aSessionID, java.lang.String aLabel)
           
 boolean isPublicKeyExist(long aSessionID, java.lang.String aLabel)
           
 boolean isTokenPresent(long aSlotID)
           
 void login(long aSessionID, java.lang.String aCardPIN)
           
 void logout(long aSessionID)
           
 long openSession(long aSlotID)
           
 byte[] readCertificate(long aSessionID, byte[] aCertSerialNo)
           
 java.util.List<byte[]> readCertificate(long aSessionID, java.lang.String aLabel)
           
 java.util.List<byte[]> readPrivateData(long aSessionID, java.lang.String aLabel)
           
 java.util.List<byte[]> readPublicData(long aSessionID, java.lang.String aLabel)
           
 java.lang.Object[] readRSAPublicKey(long aSessionID, java.lang.String aLabel)
           
 boolean setContainer(byte[] aContainerLabel, long aSessionHandle)
           
 void setSOPin(byte[] aSOPin, byte[] aNewSOPin, long aSessionHandle)
           
 byte[] signData(long aSessionID, java.lang.String aKeyLabel, byte[] aImzalanacak, long aMechanism)
           
 byte[] signDataWithCertSerialNo(long aSessionID, byte[] aSerialNumber, long aMechanism, byte[] aImzalanacak)
           
 void updatePrivateData(long aSessionID, java.lang.String aLabel, byte[] aValue)
           
 void updatePublicData(long aSessionID, java.lang.String aLabel, byte[] aValue)
           
 void verifyData(long aSessionID, java.lang.String aKeyLabel, byte[] aData, byte[] aImza, long aMechanism)
           
 void writePrivateData(long aSessionID, java.lang.String aLabel, byte[] aData)
           
 void writePublicData(long aSessionID, java.lang.String aLabel, byte[] aData)
           
 

Method Detail

getTokenPresentSlotList

long[] getTokenPresentSlotList()
                               throws sun.security.pkcs11.wrapper.PKCS11Exception
Throws:
sun.security.pkcs11.wrapper.PKCS11Exception

initialize

void initialize()
                throws sun.security.pkcs11.wrapper.PKCS11Exception,
                       java.io.IOException
Throws:
sun.security.pkcs11.wrapper.PKCS11Exception
java.io.IOException

getSlotList

long[] getSlotList()
                   throws sun.security.pkcs11.wrapper.PKCS11Exception
Throws:
sun.security.pkcs11.wrapper.PKCS11Exception

getSlotInfo

sun.security.pkcs11.wrapper.CK_SLOT_INFO getSlotInfo(long aSlotID)
                                                     throws sun.security.pkcs11.wrapper.PKCS11Exception
Throws:
sun.security.pkcs11.wrapper.PKCS11Exception

isTokenPresent

boolean isTokenPresent(long aSlotID)
                       throws sun.security.pkcs11.wrapper.PKCS11Exception
Throws:
sun.security.pkcs11.wrapper.PKCS11Exception

getTokenInfo

sun.security.pkcs11.wrapper.CK_TOKEN_INFO getTokenInfo(long aSlotID)
                                                       throws sun.security.pkcs11.wrapper.PKCS11Exception
Throws:
sun.security.pkcs11.wrapper.PKCS11Exception

getSessionInfo

sun.security.pkcs11.wrapper.CK_SESSION_INFO getSessionInfo(long aSessionID)
                                                           throws sun.security.pkcs11.wrapper.PKCS11Exception
Throws:
sun.security.pkcs11.wrapper.PKCS11Exception

getMechanismList

long[] getMechanismList(long aSlotID)
                        throws sun.security.pkcs11.wrapper.PKCS11Exception
Throws:
sun.security.pkcs11.wrapper.PKCS11Exception

openSession

long openSession(long aSlotID)
                 throws sun.security.pkcs11.wrapper.PKCS11Exception
Throws:
sun.security.pkcs11.wrapper.PKCS11Exception

closeSession

void closeSession(long aSessionID)
                  throws sun.security.pkcs11.wrapper.PKCS11Exception
Throws:
sun.security.pkcs11.wrapper.PKCS11Exception

login

void login(long aSessionID,
           java.lang.String aCardPIN)
           throws sun.security.pkcs11.wrapper.PKCS11Exception
Throws:
sun.security.pkcs11.wrapper.PKCS11Exception

logout

void logout(long aSessionID)
            throws sun.security.pkcs11.wrapper.PKCS11Exception
Throws:
sun.security.pkcs11.wrapper.PKCS11Exception

isAnyObjectExist

boolean isAnyObjectExist(long aSessionID)
                         throws sun.security.pkcs11.wrapper.PKCS11Exception
Throws:
sun.security.pkcs11.wrapper.PKCS11Exception

importCertificate

void importCertificate(long aSessionID,
                       java.lang.String aCertLabel,
                       java.security.cert.X509Certificate aSertifika)
                       throws java.io.IOException,
                              sun.security.pkcs11.wrapper.PKCS11Exception,
                              SmartCardException
Throws:
java.io.IOException
sun.security.pkcs11.wrapper.PKCS11Exception
SmartCardException

createRSAKeyPair

void createRSAKeyPair(long aSessionID,
                      java.lang.String aKeyLabel,
                      int aModulusBits,
                      boolean aIsSign,
                      boolean aIsEncrypt)
                      throws sun.security.pkcs11.wrapper.PKCS11Exception
Throws:
sun.security.pkcs11.wrapper.PKCS11Exception

signDataWithCertSerialNo

byte[] signDataWithCertSerialNo(long aSessionID,
                                byte[] aSerialNumber,
                                long aMechanism,
                                byte[] aImzalanacak)
                                throws sun.security.pkcs11.wrapper.PKCS11Exception,
                                       SmartCardException
Throws:
sun.security.pkcs11.wrapper.PKCS11Exception
SmartCardException

decryptDataWithCertSerialNo

byte[] decryptDataWithCertSerialNo(long aSessionID,
                                   byte[] aSerialNumber,
                                   long aMechanism,
                                   byte[] aData)
                                   throws sun.security.pkcs11.wrapper.PKCS11Exception,
                                          SmartCardException
Throws:
sun.security.pkcs11.wrapper.PKCS11Exception
SmartCardException

getSignatureCertificates

java.util.List<byte[]> getSignatureCertificates(long aSessionID)
                                                throws sun.security.pkcs11.wrapper.PKCS11Exception,
                                                       SmartCardException
Throws:
sun.security.pkcs11.wrapper.PKCS11Exception
SmartCardException

getEncryptionCertificates

java.util.List<byte[]> getEncryptionCertificates(long aSessionID)
                                                 throws sun.security.pkcs11.wrapper.PKCS11Exception,
                                                        SmartCardException
Throws:
sun.security.pkcs11.wrapper.PKCS11Exception
SmartCardException

getSignatureKeyLabels

java.lang.String[] getSignatureKeyLabels(long aSessionID)
                                         throws sun.security.pkcs11.wrapper.PKCS11Exception,
                                                SmartCardException
Throws:
sun.security.pkcs11.wrapper.PKCS11Exception
SmartCardException

getEncryptionKeyLabels

java.lang.String[] getEncryptionKeyLabels(long aSessionID)
                                          throws sun.security.pkcs11.wrapper.PKCS11Exception,
                                                 SmartCardException
Throws:
sun.security.pkcs11.wrapper.PKCS11Exception
SmartCardException

isObjectExist

boolean isObjectExist(long aSessionID,
                      java.lang.String aLabel)
                      throws sun.security.pkcs11.wrapper.PKCS11Exception
Throws:
sun.security.pkcs11.wrapper.PKCS11Exception

writePrivateData

void writePrivateData(long aSessionID,
                      java.lang.String aLabel,
                      byte[] aData)
                      throws sun.security.pkcs11.wrapper.PKCS11Exception
Throws:
sun.security.pkcs11.wrapper.PKCS11Exception

writePublicData

void writePublicData(long aSessionID,
                     java.lang.String aLabel,
                     byte[] aData)
                     throws sun.security.pkcs11.wrapper.PKCS11Exception
Throws:
sun.security.pkcs11.wrapper.PKCS11Exception

readPrivateData

java.util.List<byte[]> readPrivateData(long aSessionID,
                                       java.lang.String aLabel)
                                       throws sun.security.pkcs11.wrapper.PKCS11Exception,
                                              SmartCardException
Throws:
sun.security.pkcs11.wrapper.PKCS11Exception
SmartCardException

readPublicData

java.util.List<byte[]> readPublicData(long aSessionID,
                                      java.lang.String aLabel)
                                      throws sun.security.pkcs11.wrapper.PKCS11Exception,
                                             SmartCardException
Throws:
sun.security.pkcs11.wrapper.PKCS11Exception
SmartCardException

readCertificate

java.util.List<byte[]> readCertificate(long aSessionID,
                                       java.lang.String aLabel)
                                       throws sun.security.pkcs11.wrapper.PKCS11Exception,
                                              SmartCardException
Throws:
sun.security.pkcs11.wrapper.PKCS11Exception
SmartCardException

readCertificate

byte[] readCertificate(long aSessionID,
                       byte[] aCertSerialNo)
                       throws sun.security.pkcs11.wrapper.PKCS11Exception,
                              SmartCardException
Throws:
sun.security.pkcs11.wrapper.PKCS11Exception
SmartCardException

readRSAPublicKey

java.lang.Object[] readRSAPublicKey(long aSessionID,
                                    java.lang.String aLabel)
                                    throws sun.security.pkcs11.wrapper.PKCS11Exception,
                                           SmartCardException
Throws:
sun.security.pkcs11.wrapper.PKCS11Exception
SmartCardException

updatePrivateData

void updatePrivateData(long aSessionID,
                       java.lang.String aLabel,
                       byte[] aValue)
                       throws sun.security.pkcs11.wrapper.PKCS11Exception,
                              SmartCardException
Throws:
sun.security.pkcs11.wrapper.PKCS11Exception
SmartCardException

updatePublicData

void updatePublicData(long aSessionID,
                      java.lang.String aLabel,
                      byte[] aValue)
                      throws sun.security.pkcs11.wrapper.PKCS11Exception,
                             SmartCardException
Throws:
sun.security.pkcs11.wrapper.PKCS11Exception
SmartCardException

deletePrivateObject

void deletePrivateObject(long aSessionID,
                         java.lang.String aLabel)
                         throws sun.security.pkcs11.wrapper.PKCS11Exception,
                                SmartCardException
Throws:
sun.security.pkcs11.wrapper.PKCS11Exception
SmartCardException

deletePublicObject

void deletePublicObject(long aSessionID,
                        java.lang.String aLabel)
                        throws sun.security.pkcs11.wrapper.PKCS11Exception,
                               SmartCardException
Throws:
sun.security.pkcs11.wrapper.PKCS11Exception
SmartCardException

deletePrivateData

void deletePrivateData(long aSessionID,
                       java.lang.String aLabel)
                       throws sun.security.pkcs11.wrapper.PKCS11Exception,
                              SmartCardException
Throws:
sun.security.pkcs11.wrapper.PKCS11Exception
SmartCardException

deletePublicData

void deletePublicData(long aSessionID,
                      java.lang.String aLabel)
                      throws sun.security.pkcs11.wrapper.PKCS11Exception,
                             SmartCardException
Throws:
sun.security.pkcs11.wrapper.PKCS11Exception
SmartCardException

getRandomData

byte[] getRandomData(long aSessionID,
                     int aDataLength)
                     throws sun.security.pkcs11.wrapper.PKCS11Exception
Throws:
sun.security.pkcs11.wrapper.PKCS11Exception

getTokenSerialNo

byte[] getTokenSerialNo(long aSlotID)
                        throws sun.security.pkcs11.wrapper.PKCS11Exception
Throws:
sun.security.pkcs11.wrapper.PKCS11Exception

signData

byte[] signData(long aSessionID,
                java.lang.String aKeyLabel,
                byte[] aImzalanacak,
                long aMechanism)
                throws sun.security.pkcs11.wrapper.PKCS11Exception,
                       SmartCardException
Throws:
sun.security.pkcs11.wrapper.PKCS11Exception
SmartCardException

verifyData

void verifyData(long aSessionID,
                java.lang.String aKeyLabel,
                byte[] aData,
                byte[] aImza,
                long aMechanism)
                throws sun.security.pkcs11.wrapper.PKCS11Exception,
                       SmartCardException
Throws:
sun.security.pkcs11.wrapper.PKCS11Exception
SmartCardException

encryptData

byte[] encryptData(long aSessionID,
                   java.lang.String aKeyLabel,
                   byte[] aData,
                   long aMechanism)
                   throws sun.security.pkcs11.wrapper.PKCS11Exception,
                          SmartCardException
Throws:
sun.security.pkcs11.wrapper.PKCS11Exception
SmartCardException

decryptData

byte[] decryptData(long aSessionID,
                   java.lang.String aKeyLabel,
                   byte[] aData,
                   long aMechanism)
                   throws sun.security.pkcs11.wrapper.PKCS11Exception,
                          SmartCardException
Throws:
sun.security.pkcs11.wrapper.PKCS11Exception
SmartCardException

importCertificateAndKey

void importCertificateAndKey(long aSessionID,
                             java.lang.String aCertLabel,
                             java.lang.String aKeyLabel,
                             java.security.PrivateKey aPrivKey,
                             java.security.cert.X509Certificate aCert)
                             throws sun.security.pkcs11.wrapper.PKCS11Exception,
                                    java.io.IOException,
                                    SmartCardException
Throws:
sun.security.pkcs11.wrapper.PKCS11Exception
java.io.IOException
SmartCardException

importRSAKeyPair

void importRSAKeyPair(long aSessionID,
                      java.lang.String aLabel,
                      java.security.interfaces.RSAPrivateCrtKey aPrivKey,
                      byte[] aSubject,
                      boolean aIsSign,
                      boolean aIsEncrypt)
                      throws sun.security.pkcs11.wrapper.PKCS11Exception,
                             SmartCardException
Throws:
sun.security.pkcs11.wrapper.PKCS11Exception
SmartCardException

changePassword

void changePassword(java.lang.String aOldPass,
                    java.lang.String aNewPass,
                    long aSessionID)
                    throws sun.security.pkcs11.wrapper.PKCS11Exception
Throws:
sun.security.pkcs11.wrapper.PKCS11Exception

formatToken

void formatToken(java.lang.String aSOpin,
                 java.lang.String aNewPIN,
                 java.lang.String aLabel,
                 int slotID)
                 throws sun.security.pkcs11.wrapper.PKCS11Exception
Throws:
sun.security.pkcs11.wrapper.PKCS11Exception

setSOPin

void setSOPin(byte[] aSOPin,
              byte[] aNewSOPin,
              long aSessionHandle)
              throws sun.security.pkcs11.wrapper.PKCS11Exception
Throws:
sun.security.pkcs11.wrapper.PKCS11Exception

changeUserPin

void changeUserPin(byte[] aSOPin,
                   byte[] aUserPin,
                   long aSessionHandle)
                   throws sun.security.pkcs11.wrapper.PKCS11Exception
Throws:
sun.security.pkcs11.wrapper.PKCS11Exception

setContainer

boolean setContainer(byte[] aContainerLabel,
                     long aSessionHandle)

importCertificateAndKeyWithCSP

boolean importCertificateAndKeyWithCSP(byte[] aAnahtarCifti,
                                       int aAnahtarLen,
                                       java.lang.String aScfname,
                                       java.lang.String aContextName,
                                       java.security.cert.X509Certificate aPbCertData,
                                       int aSignOrEnc)

importCertificateAndKeyWithCSP

boolean importCertificateAndKeyWithCSP(byte[] aAnahtarCifti,
                                       int aAnahtarLen,
                                       java.lang.String aScfname,
                                       java.lang.String aContextName,
                                       byte[] aPbCertData,
                                       int aSignOrEnc)

isPrivateKeyExist

boolean isPrivateKeyExist(long aSessionID,
                          java.lang.String aLabel)
                          throws sun.security.pkcs11.wrapper.PKCS11Exception
Throws:
sun.security.pkcs11.wrapper.PKCS11Exception

isPublicKeyExist

boolean isPublicKeyExist(long aSessionID,
                         java.lang.String aLabel)
                         throws sun.security.pkcs11.wrapper.PKCS11Exception
Throws:
sun.security.pkcs11.wrapper.PKCS11Exception

isCertificateExist

boolean isCertificateExist(long aSessionID,
                           java.lang.String aLabel)
                           throws sun.security.pkcs11.wrapper.PKCS11Exception
Throws:
sun.security.pkcs11.wrapper.PKCS11Exception