public class PKCS11Ops extends java.lang.Object implements IPKCS11Ops
Modifier and Type | Field and Description |
---|---|
protected ESYAPKCS11 |
mESYAPKCS11 |
protected sun.security.pkcs11.wrapper.PKCS11 |
mPKCS11 |
protected java.security.MessageDigest |
OZET_ALICI |
Modifier and Type | Method and Description |
---|---|
protected void |
_deleteObject(long aSessionID,
java.lang.String aLabel,
boolean aIsPrivate,
boolean aIsToken) |
protected java.util.List<byte[]> |
_readData(long aSessionID,
java.lang.String aLabel,
boolean aIsPrivate,
boolean aIstoken,
long aDataType) |
protected java.util.List<byte[]> |
_readData(long aSessionID,
java.lang.String aLabel,
boolean aIsPrivate,
long aDataType) |
protected java.security.spec.ECPublicKeySpec |
_readECPublicKeySpec(long aSessionID,
long aKeyId) |
void |
changeLabel(long aSessionID,
java.lang.String aOldLabel,
java.lang.String aNewLabel) |
void |
changePassword(java.lang.String aOldPass,
java.lang.String aNewPass,
long aSessionID) |
protected void |
changePUK(byte[] aOldPUK,
byte[] aNewPUK,
long aSessionID) |
void |
changeUserPin(byte[] aSOPin,
byte[] aUserPin,
long aSessionID) |
void |
closeSession(long aSessionID) |
java.security.spec.KeySpec |
createKeyPair(long aSessionID,
KeyPairTemplate template) |
java.security.spec.KeySpec |
createKeyPair(long aSessionID,
RSAKeyPairTemplate template) |
void |
createKeyPair(long aSessionID,
java.lang.String aKeyLabel,
java.security.spec.AlgorithmParameterSpec aParamSpec,
boolean aIsSign,
boolean aIsEncrypt)
Deprecated.
|
protected long[] |
createKeyPairWithOutRead(long aSessionID,
ECKeyPairTemplate template) |
protected long[] |
createKeyPairWithOutRead(long aSessionID,
RSAKeyPairTemplate template) |
void |
createSecretKey(long aSessionID,
SecretKey aKey) |
void |
createSecretKey(long sessionID,
SecretKeyTemplate template) |
byte[] |
decryptData(long aSessionID,
java.lang.String aKeyLabel,
byte[] aData,
sun.security.pkcs11.wrapper.CK_MECHANISM aMechanism) |
byte[] |
decryptDataWithCertSerialNo(long aSessionID,
byte[] aSerialNumber,
sun.security.pkcs11.wrapper.CK_MECHANISM aMechanism,
byte[] aData) |
int |
deleteCertificate(long aSessionID,
java.lang.String aKeyLabel) |
void |
deletePrivateData(long aSessionID,
java.lang.String aLabel)
login olunmasi gerekir.
|
void |
deletePrivateObject(long aSessionID,
java.lang.String aLabel)
login olunmasi gerekir.
|
void |
deletePublicData(long aSessionID,
java.lang.String aLabel)
akis de login olunmasi gerekir.
|
void |
deletePublicObject(long aSessionID,
java.lang.String aLabel)
akis de login olunmasi gerekir.
|
byte[] |
encryptData(long aSessionID,
java.lang.String aKeyLabel,
byte[] aData,
sun.security.pkcs11.wrapper.CK_MECHANISM aMechanism) |
void |
formatToken(java.lang.String aSOpin,
java.lang.String aNewPIN,
java.lang.String aLabel,
int slotID) |
java.security.KeyPair |
generateECKeyPair(long aSessionID,
java.security.spec.ECParameterSpec ecParameterSpec) |
byte[] |
generateRSAPrivateKey(long aSessionID,
int keySize) |
void |
getAttributeValue(long aSessionID,
long aObjectID,
sun.security.pkcs11.wrapper.CK_ATTRIBUTE[] aTemplate) |
java.util.List<byte[]> |
getCertificates(long aSessionID) |
java.util.List<byte[]> |
getEncryptionCertificates(long aSessionID)
keyusage da keyEncipherment alaninin set edilmis olmasina bakar.
|
java.lang.String[] |
getEncryptionKeyLabels(long aSessionID) |
java.lang.String[] |
getLabels(long aSessionID,
sun.security.pkcs11.wrapper.CK_ATTRIBUTE[] aTemplate) |
long[] |
getMechanismList(long aSlotID) |
byte[] |
getModulusOfKey(long aSessionID,
long aObjID) |
sun.security.pkcs11.wrapper.PKCS11 |
getmPKCS11() |
long |
getObjIDFromPrivateKeyLabel(long aSessionID,
java.lang.String aLabel) |
long |
getObjIDFromPublicKeyLabel(long aSessionID,
java.lang.String aLabel) |
long |
getPrivateKeyObjIDFromCertificateSerial(long aSessionID,
byte[] aCertSerialNo) |
byte[] |
getRandomData(long aSessionID,
int aDataLength) |
sun.security.pkcs11.wrapper.CK_SESSION_INFO |
getSessionInfo(long aSessionID) |
java.util.List<byte[]> |
getSignatureCertificates(long aSessionID)
keyusage da digitalSignature alaninin set edilmis olmasina bakar.
|
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() |
java.util.List<tr.gov.tubitak.uekae.esya.api.common.util.bag.Pair<java.lang.Long,java.lang.String>> |
getTokenPresentSlotListWithDescription()
Returns representable slot and information lists
|
byte[] |
getTokenSerialNo(long aSlotID) |
java.lang.String[] |
getUnwrapperKeyLabels(long aSessionID) |
java.lang.String[] |
getWrapperKeyLabels(long aSessionID) |
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 aPbCertificate,
int aSignOrEnc) |
void |
importKeyPair(long sessionID,
ECKeyPairTemplate template) |
void |
importKeyPair(long sessionID,
KeyPairTemplate template) |
void |
importKeyPair(long sessionID,
RSAKeyPairTemplate template) |
void |
importKeyPair(long aSessionID,
java.lang.String aLabel,
java.security.KeyPair aKeyPair,
byte[] aSubject,
boolean aIsSign,
boolean aIsEncrypt)
Deprecated.
Use importKeyPair(SessionID, KeyPairTemplate)
|
void |
importSecretKey(long aSessionId,
SecretKey aKey) |
void |
importSecretKey(long aSessionId,
SecretKeyTemplate aKeyTemplate) |
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[] |
objeAra(long aSessionID,
sun.security.pkcs11.wrapper.CK_ATTRIBUTE[] aTemplate) |
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.security.spec.KeySpec |
readPublicKeySpec(long aSessionID,
byte[] aCertSerialNo) |
java.security.spec.KeySpec |
readPublicKeySpec(long aSessionID,
java.lang.String aLabel) |
boolean |
setContainer(byte[] aContainerLabel,
long aSessionID) |
void |
setSOPin(byte[] aSOPin,
byte[] aNewSOPin,
long aSessionID) |
byte[] |
signAndRecoverData(long aSessionID,
java.lang.String aKeyLabel,
byte[] aImzalanacak,
sun.security.pkcs11.wrapper.CK_MECHANISM aMechanism) |
byte[] |
signData(long aSessionID,
java.lang.String aKeyLabel,
byte[] aImzalanacak,
sun.security.pkcs11.wrapper.CK_MECHANISM aMechanism) |
byte[] |
signDataWithCertSerialNo(long aSessionID,
byte[] aSerialNumber,
sun.security.pkcs11.wrapper.CK_MECHANISM aMechanism,
byte[] aImzalanacak) |
byte[] |
signDataWithKeyID(long aSessionID,
long aKeyID,
sun.security.pkcs11.wrapper.CK_MECHANISM aMechanism,
byte[] aImzalanacak) |
protected byte[] |
toByteArray(java.math.BigInteger aX) |
protected void |
unBlockPIN(byte[] aPUK,
byte[] aUserPIN,
long aSessionID) |
void |
unwrapKey(long aSessionID,
sun.security.pkcs11.wrapper.CK_MECHANISM aMechanism,
byte[] certSerialNumber,
byte[] aWrappedKey,
KeyTemplate aUnwrappedKeyTemplate) |
void |
unwrapKey(long aSessionID,
sun.security.pkcs11.wrapper.CK_MECHANISM aMechanism,
KeyTemplate unwrapperKeyTemplate,
byte[] aWrappedKey,
KeyTemplate aUnwrappedKeyTemplate) |
void |
unwrapKey(long aSessionID,
sun.security.pkcs11.wrapper.CK_MECHANISM aMechanism,
java.lang.String unwrapperKeyLabel,
byte[] aWrappedKey,
KeyTemplate aUnwrappedKeyTemplate) |
void |
updatePrivateData(long aSessionID,
java.lang.String aLabel,
byte[] aValue) |
void |
updatePublicData(long aSessionID,
java.lang.String aLabel,
byte[] aValue) |
byte[] |
verifyAndRecoverData(long aSessionID,
java.lang.String aKeyLabel,
byte[] aSignature,
sun.security.pkcs11.wrapper.CK_MECHANISM aMechanism) |
void |
verifyData(long aSessionID,
java.lang.String aKeyLabel,
byte[] aData,
byte[] aImza,
sun.security.pkcs11.wrapper.CK_MECHANISM aMechanism) |
void |
verifyData(long aSessionID,
java.lang.String aKeyLabel,
byte[] aData,
byte[] aImza,
long aMechanism) |
byte[] |
wrapKey(long aSessionID,
sun.security.pkcs11.wrapper.CK_MECHANISM aMechanism,
KeyTemplate wrapperKeyTemplate,
KeyTemplate aToBeExportedKeyTemplate)
wrapKey wraps (i.e., encrypts) a private or secret key.
|
byte[] |
wrapKey(long aSessionID,
sun.security.pkcs11.wrapper.CK_MECHANISM aMechanism,
java.lang.String wrapperKeyLabel,
java.lang.String aKeyLabel)
wrapKey wraps (i.e., encrypts) a private or secret key.
|
void |
writePrivateData(long aSessionID,
java.lang.String aLabel,
byte[] aData) |
void |
writePublicData(long aSessionID,
java.lang.String aLabel,
byte[] aData) |
protected sun.security.pkcs11.wrapper.PKCS11 mPKCS11
protected java.security.MessageDigest OZET_ALICI
protected ESYAPKCS11 mESYAPKCS11
public PKCS11Ops(CardType aKartTip)
public void initialize() throws sun.security.pkcs11.wrapper.PKCS11Exception, java.io.IOException
initialize
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
java.io.IOException
public long[] getTokenPresentSlotList() throws sun.security.pkcs11.wrapper.PKCS11Exception
getTokenPresentSlotList
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
public java.util.List<tr.gov.tubitak.uekae.esya.api.common.util.bag.Pair<java.lang.Long,java.lang.String>> getTokenPresentSlotListWithDescription() throws sun.security.pkcs11.wrapper.PKCS11Exception
getTokenPresentSlotListWithDescription
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
public long[] getSlotList() throws sun.security.pkcs11.wrapper.PKCS11Exception
getSlotList
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
public sun.security.pkcs11.wrapper.CK_SLOT_INFO getSlotInfo(long aSlotID) throws sun.security.pkcs11.wrapper.PKCS11Exception
getSlotInfo
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
public sun.security.pkcs11.wrapper.CK_SESSION_INFO getSessionInfo(long aSessionID) throws sun.security.pkcs11.wrapper.PKCS11Exception
getSessionInfo
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
public boolean isTokenPresent(long aSlotID) throws sun.security.pkcs11.wrapper.PKCS11Exception
isTokenPresent
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
public sun.security.pkcs11.wrapper.CK_TOKEN_INFO getTokenInfo(long aSlotID) throws sun.security.pkcs11.wrapper.PKCS11Exception
getTokenInfo
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
public long[] getMechanismList(long aSlotID) throws sun.security.pkcs11.wrapper.PKCS11Exception
getMechanismList
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
public long openSession(long aSlotID) throws sun.security.pkcs11.wrapper.PKCS11Exception
openSession
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
public void closeSession(long aSessionID) throws sun.security.pkcs11.wrapper.PKCS11Exception
closeSession
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
public void login(long aSessionID, java.lang.String aCardPIN) throws sun.security.pkcs11.wrapper.PKCS11Exception
login
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
public void logout(long aSessionID) throws sun.security.pkcs11.wrapper.PKCS11Exception
logout
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
public boolean isAnyObjectExist(long aSessionID) throws sun.security.pkcs11.wrapper.PKCS11Exception
isAnyObjectExist
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
public void importCertificate(long aSessionID, java.lang.String aCertLabel, java.security.cert.X509Certificate aSertifika) throws sun.security.pkcs11.wrapper.PKCS11Exception
importCertificate
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
@Deprecated public void createKeyPair(long aSessionID, java.lang.String aKeyLabel, java.security.spec.AlgorithmParameterSpec aParamSpec, boolean aIsSign, boolean aIsEncrypt) throws sun.security.pkcs11.wrapper.PKCS11Exception, SmartCardException, java.io.IOException
createKeyPair
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
SmartCardException
java.io.IOException
public void createSecretKey(long aSessionID, SecretKey aKey) throws sun.security.pkcs11.wrapper.PKCS11Exception
createSecretKey
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
public void importSecretKey(long aSessionId, SecretKey aKey) throws sun.security.pkcs11.wrapper.PKCS11Exception
importSecretKey
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
public void importSecretKey(long aSessionId, SecretKeyTemplate aKeyTemplate) throws sun.security.pkcs11.wrapper.PKCS11Exception, SmartCardException
importSecretKey
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
SmartCardException
public byte[] signDataWithKeyID(long aSessionID, long aKeyID, sun.security.pkcs11.wrapper.CK_MECHANISM aMechanism, byte[] aImzalanacak) throws sun.security.pkcs11.wrapper.PKCS11Exception
signDataWithKeyID
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
public byte[] signDataWithCertSerialNo(long aSessionID, byte[] aSerialNumber, sun.security.pkcs11.wrapper.CK_MECHANISM aMechanism, byte[] aImzalanacak) throws sun.security.pkcs11.wrapper.PKCS11Exception, SmartCardException
signDataWithCertSerialNo
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
SmartCardException
public byte[] decryptDataWithCertSerialNo(long aSessionID, byte[] aSerialNumber, sun.security.pkcs11.wrapper.CK_MECHANISM aMechanism, byte[] aData) throws sun.security.pkcs11.wrapper.PKCS11Exception, SmartCardException
decryptDataWithCertSerialNo
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
SmartCardException
public java.util.List<byte[]> getSignatureCertificates(long aSessionID) throws sun.security.pkcs11.wrapper.PKCS11Exception, SmartCardException
getSignatureCertificates
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
SmartCardException
public java.util.List<byte[]> getEncryptionCertificates(long aSessionID) throws sun.security.pkcs11.wrapper.PKCS11Exception, SmartCardException
getEncryptionCertificates
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
SmartCardException
public java.util.List<byte[]> getCertificates(long aSessionID) throws sun.security.pkcs11.wrapper.PKCS11Exception
getCertificates
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
public java.lang.String[] getSignatureKeyLabels(long aSessionID) throws sun.security.pkcs11.wrapper.PKCS11Exception
getSignatureKeyLabels
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
public java.lang.String[] getEncryptionKeyLabels(long aSessionID) throws sun.security.pkcs11.wrapper.PKCS11Exception
getEncryptionKeyLabels
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
public java.lang.String[] getWrapperKeyLabels(long aSessionID) throws sun.security.pkcs11.wrapper.PKCS11Exception
getWrapperKeyLabels
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
public java.lang.String[] getUnwrapperKeyLabels(long aSessionID) throws sun.security.pkcs11.wrapper.PKCS11Exception
getUnwrapperKeyLabels
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
public java.lang.String[] getLabels(long aSessionID, sun.security.pkcs11.wrapper.CK_ATTRIBUTE[] aTemplate) throws sun.security.pkcs11.wrapper.PKCS11Exception
sun.security.pkcs11.wrapper.PKCS11Exception
public boolean isObjectExist(long aSessionID, java.lang.String aLabel) throws sun.security.pkcs11.wrapper.PKCS11Exception
isObjectExist
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
public void writePrivateData(long aSessionID, java.lang.String aLabel, byte[] aData) throws sun.security.pkcs11.wrapper.PKCS11Exception
writePrivateData
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
public void writePublicData(long aSessionID, java.lang.String aLabel, byte[] aData) throws sun.security.pkcs11.wrapper.PKCS11Exception
writePublicData
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
protected java.util.List<byte[]> _readData(long aSessionID, java.lang.String aLabel, boolean aIsPrivate, long aDataType) throws sun.security.pkcs11.wrapper.PKCS11Exception, SmartCardException
sun.security.pkcs11.wrapper.PKCS11Exception
SmartCardException
protected java.util.List<byte[]> _readData(long aSessionID, java.lang.String aLabel, boolean aIsPrivate, boolean aIstoken, long aDataType) throws sun.security.pkcs11.wrapper.PKCS11Exception, SmartCardException
sun.security.pkcs11.wrapper.PKCS11Exception
SmartCardException
public java.util.List<byte[]> readPrivateData(long aSessionID, java.lang.String aLabel) throws sun.security.pkcs11.wrapper.PKCS11Exception, SmartCardException
readPrivateData
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
SmartCardException
public java.util.List<byte[]> readPublicData(long aSessionID, java.lang.String aLabel) throws sun.security.pkcs11.wrapper.PKCS11Exception, SmartCardException
readPublicData
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
SmartCardException
public boolean isPrivateKeyExist(long aSessionID, java.lang.String aLabel) throws sun.security.pkcs11.wrapper.PKCS11Exception
isPrivateKeyExist
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
public boolean isPublicKeyExist(long aSessionID, java.lang.String aLabel) throws sun.security.pkcs11.wrapper.PKCS11Exception
isPublicKeyExist
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
public boolean isCertificateExist(long aSessionID, java.lang.String aLabel) throws sun.security.pkcs11.wrapper.PKCS11Exception
isCertificateExist
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
public java.util.List<byte[]> readCertificate(long aSessionID, java.lang.String aLabel) throws sun.security.pkcs11.wrapper.PKCS11Exception, SmartCardException
readCertificate
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
SmartCardException
public byte[] readCertificate(long aSessionID, byte[] aCertSerialNo) throws sun.security.pkcs11.wrapper.PKCS11Exception, SmartCardException
readCertificate
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
SmartCardException
public java.security.spec.KeySpec readPublicKeySpec(long aSessionID, java.lang.String aLabel) throws sun.security.pkcs11.wrapper.PKCS11Exception, SmartCardException
readPublicKeySpec
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
SmartCardException
public java.security.spec.KeySpec readPublicKeySpec(long aSessionID, byte[] aCertSerialNo) throws SmartCardException, sun.security.pkcs11.wrapper.PKCS11Exception
readPublicKeySpec
in interface IPKCS11Ops
SmartCardException
sun.security.pkcs11.wrapper.PKCS11Exception
public long getPrivateKeyObjIDFromCertificateSerial(long aSessionID, byte[] aCertSerialNo) throws SmartCardException, sun.security.pkcs11.wrapper.PKCS11Exception
getPrivateKeyObjIDFromCertificateSerial
in interface IPKCS11Ops
SmartCardException
sun.security.pkcs11.wrapper.PKCS11Exception
protected java.security.spec.ECPublicKeySpec _readECPublicKeySpec(long aSessionID, long aKeyId) throws sun.security.pkcs11.wrapper.PKCS11Exception, SmartCardException
sun.security.pkcs11.wrapper.PKCS11Exception
SmartCardException
public void updatePrivateData(long aSessionID, java.lang.String aLabel, byte[] aValue) throws sun.security.pkcs11.wrapper.PKCS11Exception, SmartCardException
updatePrivateData
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
SmartCardException
public void updatePublicData(long aSessionID, java.lang.String aLabel, byte[] aValue) throws sun.security.pkcs11.wrapper.PKCS11Exception, SmartCardException
updatePublicData
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
SmartCardException
protected void _deleteObject(long aSessionID, java.lang.String aLabel, boolean aIsPrivate, boolean aIsToken) throws sun.security.pkcs11.wrapper.PKCS11Exception, SmartCardException
sun.security.pkcs11.wrapper.PKCS11Exception
SmartCardException
public void deletePrivateObject(long aSessionID, java.lang.String aLabel) throws sun.security.pkcs11.wrapper.PKCS11Exception, SmartCardException
deletePrivateObject
in interface IPKCS11Ops
aLabel
- Karttan silinecek nesnenin ismidir.Bu isimdeki nesnenin tipi CKO_DATA, CKO_CERTIFICATE,
CKO_PUBLIC_KEY, CKO_PRIVATE_KEY, CKO_SECRET_KEY olabilir.
Kartta bu isimde birden fazla nesne varsa, hepsi silinir.sun.security.pkcs11.wrapper.PKCS11Exception
SmartCardException
public void deletePublicObject(long aSessionID, java.lang.String aLabel) throws sun.security.pkcs11.wrapper.PKCS11Exception, SmartCardException
deletePublicObject
in interface IPKCS11Ops
aLabel
- Karttan silinecek nesnenin ismidir.Bu isimdeki nesnenin tipi CKO_DATA, CKO_CERTIFICATE,
CKO_PUBLIC_KEY, CKO_PRIVATE_KEY, CKO_SECRET_KEY olabilir.
Kartta bu isimde birden fazla nesne varsa, hepsi silinir.sun.security.pkcs11.wrapper.PKCS11Exception
SmartCardException
public void deletePrivateData(long aSessionID, java.lang.String aLabel) throws sun.security.pkcs11.wrapper.PKCS11Exception, SmartCardException
deletePrivateData
in interface IPKCS11Ops
aLabel
- Karttan silinecek CKO_DATA tipindeki nesnenin ismidir.
Kartta bu isimde birden fazla nesne varsa, hepsi silinir.sun.security.pkcs11.wrapper.PKCS11Exception
SmartCardException
public void deletePublicData(long aSessionID, java.lang.String aLabel) throws sun.security.pkcs11.wrapper.PKCS11Exception, SmartCardException
deletePublicData
in interface IPKCS11Ops
aLabel
- Karttan silinecek CKO_DATA tipindeki nesnenin ismidir.
Kartta bu isimde birden fazla nesne varsa, hepsi silinir.sun.security.pkcs11.wrapper.PKCS11Exception
SmartCardException
public byte[] getRandomData(long aSessionID, int aDataLength) throws sun.security.pkcs11.wrapper.PKCS11Exception
getRandomData
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
public byte[] getTokenSerialNo(long aSlotID) throws sun.security.pkcs11.wrapper.PKCS11Exception
getTokenSerialNo
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
public byte[] signData(long aSessionID, java.lang.String aKeyLabel, byte[] aImzalanacak, sun.security.pkcs11.wrapper.CK_MECHANISM aMechanism) throws sun.security.pkcs11.wrapper.PKCS11Exception, SmartCardException
signData
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
SmartCardException
public byte[] signAndRecoverData(long aSessionID, java.lang.String aKeyLabel, byte[] aImzalanacak, sun.security.pkcs11.wrapper.CK_MECHANISM aMechanism) throws sun.security.pkcs11.wrapper.PKCS11Exception, SmartCardException
signAndRecoverData
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
SmartCardException
public byte[] verifyAndRecoverData(long aSessionID, java.lang.String aKeyLabel, byte[] aSignature, sun.security.pkcs11.wrapper.CK_MECHANISM aMechanism) throws sun.security.pkcs11.wrapper.PKCS11Exception, SmartCardException
verifyAndRecoverData
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
SmartCardException
public void verifyData(long aSessionID, java.lang.String aKeyLabel, byte[] aData, byte[] aImza, sun.security.pkcs11.wrapper.CK_MECHANISM aMechanism) throws sun.security.pkcs11.wrapper.PKCS11Exception, SmartCardException
verifyData
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
SmartCardException
public void verifyData(long aSessionID, java.lang.String aKeyLabel, byte[] aData, byte[] aImza, long aMechanism) throws sun.security.pkcs11.wrapper.PKCS11Exception, SmartCardException
verifyData
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
SmartCardException
public byte[] encryptData(long aSessionID, java.lang.String aKeyLabel, byte[] aData, sun.security.pkcs11.wrapper.CK_MECHANISM aMechanism) throws sun.security.pkcs11.wrapper.PKCS11Exception, SmartCardException
encryptData
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
SmartCardException
public byte[] decryptData(long aSessionID, java.lang.String aKeyLabel, byte[] aData, sun.security.pkcs11.wrapper.CK_MECHANISM aMechanism) throws sun.security.pkcs11.wrapper.PKCS11Exception, SmartCardException
decryptData
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
SmartCardException
public 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, SmartCardException, java.io.IOException
importCertificateAndKey
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
SmartCardException
java.io.IOException
@Deprecated public void importKeyPair(long aSessionID, java.lang.String aLabel, java.security.KeyPair aKeyPair, byte[] aSubject, boolean aIsSign, boolean aIsEncrypt) throws sun.security.pkcs11.wrapper.PKCS11Exception, SmartCardException, java.io.IOException
importKeyPair
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
SmartCardException
java.io.IOException
public void changePassword(java.lang.String aOldPass, java.lang.String aNewPass, long aSessionID) throws sun.security.pkcs11.wrapper.PKCS11Exception
changePassword
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
public void formatToken(java.lang.String aSOpin, java.lang.String aNewPIN, java.lang.String aLabel, int slotID) throws sun.security.pkcs11.wrapper.PKCS11Exception
formatToken
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
public void setSOPin(byte[] aSOPin, byte[] aNewSOPin, long aSessionID) throws sun.security.pkcs11.wrapper.PKCS11Exception
setSOPin
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
public void changeUserPin(byte[] aSOPin, byte[] aUserPin, long aSessionID) throws sun.security.pkcs11.wrapper.PKCS11Exception
changeUserPin
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
public boolean setContainer(byte[] aContainerLabel, long aSessionID)
setContainer
in interface IPKCS11Ops
public boolean importCertificateAndKeyWithCSP(byte[] aAnahtarCifti, int aAnahtarLen, java.lang.String aScfname, java.lang.String aContextName, byte[] aPbCertData, int aSignOrEnc)
importCertificateAndKeyWithCSP
in interface IPKCS11Ops
public boolean importCertificateAndKeyWithCSP(byte[] aAnahtarCifti, int aAnahtarLen, java.lang.String aScfname, java.lang.String aContextName, java.security.cert.X509Certificate aPbCertificate, int aSignOrEnc)
importCertificateAndKeyWithCSP
in interface IPKCS11Ops
protected void changePUK(byte[] aOldPUK, byte[] aNewPUK, long aSessionID) throws sun.security.pkcs11.wrapper.PKCS11Exception
sun.security.pkcs11.wrapper.PKCS11Exception
protected void unBlockPIN(byte[] aPUK, byte[] aUserPIN, long aSessionID) throws sun.security.pkcs11.wrapper.PKCS11Exception
sun.security.pkcs11.wrapper.PKCS11Exception
public long[] objeAra(long aSessionID, sun.security.pkcs11.wrapper.CK_ATTRIBUTE[] aTemplate) throws sun.security.pkcs11.wrapper.PKCS11Exception
objeAra
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
public void getAttributeValue(long aSessionID, long aObjectID, sun.security.pkcs11.wrapper.CK_ATTRIBUTE[] aTemplate) throws sun.security.pkcs11.wrapper.PKCS11Exception
getAttributeValue
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
public void changeLabel(long aSessionID, java.lang.String aOldLabel, java.lang.String aNewLabel) throws sun.security.pkcs11.wrapper.PKCS11Exception, SmartCardException
changeLabel
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
SmartCardException
protected byte[] toByteArray(java.math.BigInteger aX)
public byte[] generateRSAPrivateKey(long aSessionID, int keySize) throws tr.gov.tubitak.uekae.esya.api.common.ESYAException
generateRSAPrivateKey
in interface IPKCS11Ops
tr.gov.tubitak.uekae.esya.api.common.ESYAException
public java.security.KeyPair generateECKeyPair(long aSessionID, java.security.spec.ECParameterSpec ecParameterSpec) throws tr.gov.tubitak.uekae.esya.api.common.ESYAException
generateECKeyPair
in interface IPKCS11Ops
tr.gov.tubitak.uekae.esya.api.common.ESYAException
public byte[] getModulusOfKey(long aSessionID, long aObjID) throws sun.security.pkcs11.wrapper.PKCS11Exception
getModulusOfKey
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
public long getObjIDFromPublicKeyLabel(long aSessionID, java.lang.String aLabel) throws SmartCardException, sun.security.pkcs11.wrapper.PKCS11Exception
getObjIDFromPublicKeyLabel
in interface IPKCS11Ops
SmartCardException
sun.security.pkcs11.wrapper.PKCS11Exception
public long getObjIDFromPrivateKeyLabel(long aSessionID, java.lang.String aLabel) throws SmartCardException, sun.security.pkcs11.wrapper.PKCS11Exception
getObjIDFromPrivateKeyLabel
in interface IPKCS11Ops
SmartCardException
sun.security.pkcs11.wrapper.PKCS11Exception
public byte[] wrapKey(long aSessionID, sun.security.pkcs11.wrapper.CK_MECHANISM aMechanism, java.lang.String wrapperKeyLabel, java.lang.String aKeyLabel) throws sun.security.pkcs11.wrapper.PKCS11Exception, SmartCardException
wrapKey
in interface IPKCS11Ops
aSessionID
- session idaMechanism
- wrapping mechanismwrapperKeyLabel
- label of the wrapping keyaKeyLabel
- label of the key that will be wrappedSmartCardException
- if keys with given label are not found.sun.security.pkcs11.wrapper.PKCS11Exception
public byte[] wrapKey(long aSessionID, sun.security.pkcs11.wrapper.CK_MECHANISM aMechanism, KeyTemplate wrapperKeyTemplate, KeyTemplate aToBeExportedKeyTemplate) throws sun.security.pkcs11.wrapper.PKCS11Exception
wrapKey
in interface IPKCS11Ops
aSessionID
- session idaMechanism
- wrapping mechanismwrapperKeyTemplate
- KeyFacade of the wrapping keyaToBeExportedKeyTemplate
- KeyFacade of the key that will be wrappedsun.security.pkcs11.wrapper.PKCS11Exception
public void unwrapKey(long aSessionID, sun.security.pkcs11.wrapper.CK_MECHANISM aMechanism, java.lang.String unwrapperKeyLabel, byte[] aWrappedKey, KeyTemplate aUnwrappedKeyTemplate) throws sun.security.pkcs11.wrapper.PKCS11Exception, SmartCardException
unwrapKey
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
SmartCardException
public void unwrapKey(long aSessionID, sun.security.pkcs11.wrapper.CK_MECHANISM aMechanism, KeyTemplate unwrapperKeyTemplate, byte[] aWrappedKey, KeyTemplate aUnwrappedKeyTemplate) throws sun.security.pkcs11.wrapper.PKCS11Exception, SmartCardException
unwrapKey
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
SmartCardException
public void unwrapKey(long aSessionID, sun.security.pkcs11.wrapper.CK_MECHANISM aMechanism, byte[] certSerialNumber, byte[] aWrappedKey, KeyTemplate aUnwrappedKeyTemplate) throws sun.security.pkcs11.wrapper.PKCS11Exception, SmartCardException
unwrapKey
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
SmartCardException
public sun.security.pkcs11.wrapper.PKCS11 getmPKCS11()
public java.security.spec.KeySpec createKeyPair(long aSessionID, KeyPairTemplate template) throws sun.security.pkcs11.wrapper.PKCS11Exception, java.io.IOException, SmartCardException
createKeyPair
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
java.io.IOException
SmartCardException
public java.security.spec.KeySpec createKeyPair(long aSessionID, RSAKeyPairTemplate template) throws sun.security.pkcs11.wrapper.PKCS11Exception, SmartCardException
sun.security.pkcs11.wrapper.PKCS11Exception
SmartCardException
protected long[] createKeyPairWithOutRead(long aSessionID, RSAKeyPairTemplate template) throws sun.security.pkcs11.wrapper.PKCS11Exception, SmartCardException
sun.security.pkcs11.wrapper.PKCS11Exception
SmartCardException
protected long[] createKeyPairWithOutRead(long aSessionID, ECKeyPairTemplate template) throws sun.security.pkcs11.wrapper.PKCS11Exception, SmartCardException
sun.security.pkcs11.wrapper.PKCS11Exception
SmartCardException
public void importKeyPair(long sessionID, KeyPairTemplate template) throws sun.security.pkcs11.wrapper.PKCS11Exception, SmartCardException
importKeyPair
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
SmartCardException
public void importKeyPair(long sessionID, RSAKeyPairTemplate template) throws sun.security.pkcs11.wrapper.PKCS11Exception
sun.security.pkcs11.wrapper.PKCS11Exception
public void importKeyPair(long sessionID, ECKeyPairTemplate template) throws sun.security.pkcs11.wrapper.PKCS11Exception
sun.security.pkcs11.wrapper.PKCS11Exception
public void createSecretKey(long sessionID, SecretKeyTemplate template) throws sun.security.pkcs11.wrapper.PKCS11Exception, SmartCardException
createSecretKey
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
SmartCardException
public int deleteCertificate(long aSessionID, java.lang.String aKeyLabel) throws sun.security.pkcs11.wrapper.PKCS11Exception
deleteCertificate
in interface IPKCS11Ops
sun.security.pkcs11.wrapper.PKCS11Exception
Copyright © 2025. All rights reserved.