public class ProxyP11Slot extends P11Slot
P11Slot.P11KeyUsage, P11Slot.P11NewKeyControl, P11Slot.P11NewObjectControl, P11Slot.P11SlotRefreshResultmoduleName| Modifier and Type | Method and Description |
|---|---|
protected P11ObjectIdentifier |
addCert0(X509Certificate cert,
P11Slot.P11NewObjectControl control)
Adds the certificate to the PKCS#11 token under the given identifier
objectId. |
void |
close() |
protected P11Identity |
generateDSAKeypair0(BigInteger p,
BigInteger q,
BigInteger g,
P11Slot.P11NewKeyControl control)
Generates a DSA keypair.
|
protected P11Identity |
generateECKeypair0(org.bouncycastle.asn1.ASN1ObjectIdentifier curveId,
P11Slot.P11NewKeyControl control)
Generates an EC keypair.
|
protected P11Identity |
generateRSAKeypair0(int keysize,
BigInteger publicExponent,
P11Slot.P11NewKeyControl control)
Generates an RSA keypair.
|
protected P11Identity |
generateSecretKey0(long keyType,
int keysize,
P11Slot.P11NewKeyControl control)
Generates a secret key in the PKCS#11 token.
|
protected P11Identity |
generateSM2Keypair0(P11Slot.P11NewKeyControl control)
Generates an SM2p256v1 keypair.
|
protected P11Identity |
importSecretKey0(long keyType,
byte[] keyValue,
P11Slot.P11NewKeyControl control)
Imports secret key object in the PKCS#11 token.
|
protected P11Slot.P11SlotRefreshResult |
refresh0() |
protected void |
removeCerts0(P11ObjectIdentifier objectId) |
protected void |
removeIdentity0(P11IdentityId identityId)
Removes the key (private key, public key, secret key, and certificates) associated with
the given identifier
objectId. |
int |
removeObjects(byte[] id,
String label)
TODO.
|
protected void |
updateCertificate0(P11ObjectIdentifier objectId,
X509Certificate newCert)
Updates the certificate associated with the given
objectId with the given certificate
newCert. |
addCert, addIdentity, assertMechanismSupported, assertNoIdentityAndCert, assertWritable, decodeHex, existsCertForId, existsIdentityForId, exportCert, generateDSAKeypair, generateDSAKeypair, generateECKeypair, generateLabel, generateRSAKeypair, generateSecretKey, generateSM2Keypair, getCert, getCertForId, getCertIds, getDescription, getDescription, getIdentity, getIdentityId, getIdentityKeyIds, getMechanisms, getModuleName, getObjectId, getSlotId, hasIdentity, hex, importSecretKey, isReadOnly, refresh, removeCerts, removeIdentity, removeIdentityByKeyId, showDetails, supportsMechanism, updateCertificateprotected P11Slot.P11SlotRefreshResult refresh0() throws P11TokenException
refresh0 in class P11SlotP11TokenExceptionpublic void close()
public int removeObjects(byte[] id,
String label)
throws P11TokenException
P11SlotremoveObjects in class P11Slotid - Id of the objects to be deleted. At least one of id and label may not be null.label - Label of the objects to be deletedP11TokenException - If PKCS#11 error happens.protected void removeIdentity0(P11IdentityId identityId) throws P11TokenException
P11SlotobjectId.removeIdentity0 in class P11SlotidentityId - Identity identifier. Must not be null.P11TokenException - if PKCS#11 token exception occurs.protected P11ObjectIdentifier addCert0(X509Certificate cert, P11Slot.P11NewObjectControl control) throws P11TokenException, CertificateException
P11SlotobjectId.addCert0 in class P11Slotcert - Certificate to be added. Must not be null.control - Control of the object creation process. Must not be null.P11TokenException - if PKCS#11 token exception occurs.CertificateException - if process with certificate fails.protected void removeCerts0(P11ObjectIdentifier objectId) throws P11TokenException
removeCerts0 in class P11SlotP11TokenExceptionprotected P11Identity generateSecretKey0(long keyType, int keysize, P11Slot.P11NewKeyControl control) throws P11TokenException
P11SlotgenerateSecretKey0 in class P11SlotkeyType - key typekeysize - key sizecontrol - Control of the key generation process. Must not be null.P11TokenException - if PKCS#11 token exception occurs.protected P11Identity importSecretKey0(long keyType, byte[] keyValue, P11Slot.P11NewKeyControl control) throws P11TokenException
P11SlotimportSecretKey0 in class P11SlotkeyType - key type.keyValue - Key value. Must not be null.control - Control of the key generation process. Must not be null.P11TokenException - if PKCS#11 token exception occurs.protected P11Identity generateRSAKeypair0(int keysize, BigInteger publicExponent, P11Slot.P11NewKeyControl control) throws P11TokenException
P11SlotgenerateRSAKeypair0 in class P11Slotkeysize - key size in bitpublicExponent - RSA public exponent. Could be null.control - Control of the key generation process. Must not be null.P11TokenException - if PKCS#11 token exception occurs.protected P11Identity generateDSAKeypair0(BigInteger p, BigInteger q, BigInteger g, P11Slot.P11NewKeyControl control) throws P11TokenException
P11SlotgenerateDSAKeypair0 in class P11Slotp - p of DSA. Must not be null.q - q of DSA. Must not be null.g - g of DSA. Must not be null.control - Control of the key generation process. Must not be null.P11TokenException - if PKCS#11 token exception occurs.protected P11Identity generateECKeypair0(org.bouncycastle.asn1.ASN1ObjectIdentifier curveId, P11Slot.P11NewKeyControl control) throws P11TokenException
P11SlotgenerateECKeypair0 in class P11SlotcurveId - Object identifier of the EC curve. Must not be null.control - Control of the key generation process. Must not be null.P11TokenException - if PKCS#11 token exception occurs.protected P11Identity generateSM2Keypair0(P11Slot.P11NewKeyControl control) throws P11TokenException
P11SlotgenerateSM2Keypair0 in class P11Slotcontrol - Control of the key generation process. Must not be null.P11TokenException - if PKCS#11 token exception occurs.protected void updateCertificate0(P11ObjectIdentifier objectId, X509Certificate newCert) throws P11TokenException, CertificateException
P11SlotobjectId with the given certificate
newCert.updateCertificate0 in class P11SlotobjectId - Object identifier of the private key. Must not be null.newCert - Certificate to be added. Must not be null.P11TokenException - if PKCS#11 token exception occurs.CertificateException - if process with certificate fails.Copyright © 2018. All rights reserved.