| Package | Description |
|---|---|
| com.entrust.toolkit.capi |
Contains low-level classes for interfacing with Microsoft's Crypto API.
|
| com.entrust.toolkit.credentials |
Contains classes the enable creation, recovery, reading, and writing of
digital identities using a
variety of key sources, classes for implementing the Toolkit's KeyStore
capabilities, and classes to support integration with a Smart Card
Management System.
|
| com.entrust.toolkit.security.crypto.digest |
Contains implementations of message digest algorithms.
|
| com.entrust.toolkit.x509.certstore |
Contains the certificate stores and classes used during certificate path
building.
|
| Modifier and Type | Method and Description |
|---|---|
void |
CertStore.addCertificateContextToStore(CertContext certContext,
CertStoreAddDisposition addDisposition)
Adds the given certificate to this store.
|
static CertContext |
CertContext.createCertificateContext(int encodingType,
X509Certificate cert)
Creates a CAPI
CertContext object from the given
certificate. |
static CertContext |
CertContext.createCertificateContext(X509Certificate cert)
Creates an MSCAPI certificate context for the given certificate.
|
static java.security.PrivateKey |
CryptKey.decodePrivateKey(byte[] keyBlob)
Decodes a software-based private key from MSCAPI key blob representation.
|
byte[] |
CryptKey.decrypt(boolean isFinal,
byte[] data,
int offset,
int length)
Decrypt data previously encrypted using
encrypt. |
void |
CertContext.deleteCertificateFromStore()
Delete this certificate from its certificate store.
|
void |
CertContext.deleteCertificateProperty(CertPropertyId propertyId)
Deletes the indicated certificate property.
|
CertContext |
CertContext.duplicate()
Duplicates this certificate context by calling the CAPI function
CertDuplicateCertificateContext. |
static byte[] |
CryptKey.encodePrivateKey(java.security.PrivateKey privateKey,
KeySpec keySpec)
Encodes a software-based private key to MSCAPI key blob representation.
|
byte[] |
CryptKey.encrypt(boolean isFinal,
byte[] data,
int offset,
int length)
Encrypts data.
|
CertContext |
CertStore.enumCertificatesInStore(CertContext previousContext)
Enumerates the certificates contained in this certificate store.
|
java.security.PublicKey |
CryptKey.exportPublicKey()
Exports the public key from MSCAPI to software-based representation.
|
CertContext |
CertStore.findCertificateInStore(CertContext certToFind)
Attempt to find the given certificate in this store, and return a
read-only copy of it if it is.
|
CertContext |
CertStore.findCertificateInStore(int findFlags,
CertFindType findType,
java.lang.Object findParameter,
CertContext previousCertContext)
Attempt to find a certificate in this store matching the given
parameters, and return a read-only copy of it if it is.
|
void |
CryptProvider.forceUseHardwareRng()
Force random number generation to be done using a hardware RNG.
|
static java.security.KeyPair |
CryptKey.generateKeyPair(CryptProvider provider,
EntrustAsymKeyType keyType,
KeySpec keySpec,
int flags)
Generates a key pair in MSCAPI.
|
void |
CryptProvider.genRandom(byte[] randomBytes)
Fills the given array with random bytes.
|
void |
CryptProvider.genRandom(byte[] randomBytes,
int offset,
int length)
Fills the given array with
length random bytes, starting at
offset. |
byte[] |
CryptProvider.genRandom(int numBytes)
Generates
numBytes random bytes and returns an array
containing those bytes. |
KeyAlgorithms |
CryptKey.getAlgorithm()
Returns the algorithm associated with this key, or
null if
the algorithm is not recognized. |
CertChainContext |
CertContext.getCertificateChain(java.util.Date dateTime,
CertStore additionalStore,
int flags)
Calls to CAPI to obtain a certificate chain from the
certificate represented by this object to a trusted root.
|
java.lang.Object |
CertContext.getCertificateProperty(CertPropertyId propertyId)
Gets the indicated certificate property.
|
java.util.List<java.lang.String> |
CryptProvider.getContainers()
Returns a
List of Strings that are the names of
the containers belonging to this provider. |
byte[] |
CryptProvider.getCSPParam(ProviderParam providerParam)
Gets the value of a CSP parametet associated with this CryptProvider in
MSCAPI
|
static ProviderInfo |
CryptProvider.getDefaultProviderInfo(ProviderType providerType,
int flags)
Returns information about the default provider for the given provider
type.
|
static ProviderInfo |
CryptProvider.getFirstAvailableProvider(java.lang.String[] providerNames)
Given a String list of provider names, return the first provider that
is available.
|
static CryptHash |
CryptHash.getHashInstance(CryptProvider provider,
HashAlgorithms hashAlg)
Creates and returns a CAPI hash with the given algorithm, associated with
the given provider.
|
byte[] |
CryptHash.getHashValue()
Completes the hash computation and returns the hash value.
|
static CryptKey |
CryptKey.getInstance(CryptProvider provider,
KeySpec keySpec)
Creates and returns a
CryptKey object associated with a
public/private key pair that already exists in CAPI. |
static CryptProvider |
CryptProvider.getInstance(java.lang.String container,
java.lang.String provider,
ProviderType providerType,
int flags)
Creates an returns an initialized CryptProvider.
|
byte[] |
CryptKey.getKeyParam(KeyParam keyParamId)
Gets the value of a parameter associated with this key in MSCAPI.
|
byte[] |
CryptKey.getKeyParameter(KeyParam parameter)
Deprecated.
use
CryptKey.getKeyParam(KeyParam) instead; since 8.0 |
KeySpec |
CryptKey.getKeySpec()
Gets the key specifier associated with this key.
|
static ProviderInfo |
CryptProvider.getProviderInfo(java.lang.String providerName)
Returns information about the MSCAPI cryptographic service provider (CSP)
with the given name.
|
static java.util.List<ProviderInfo> |
CryptProvider.getProviders()
Returns a
List of ProviderInfo objects, one for
each provider installed on the system. |
static java.util.List<ProviderInfo> |
CryptProvider.getProviderTypes()
Returns a
List of ProviderInfo objects, one for
each provider type installed on the system. |
static byte[] |
CryptProvider.getRandomDataFromDefaultProvider(int size)
Generates the requested number of random bytes using the default CAPI
cryptographic service provider.
|
byte[] |
CryptHash.getSignedHash()
Signs the current hash value and returns the bytes of the signature.
|
java.util.List<ProviderAlgorithmInfo> |
CryptProvider.getSupportedAlgorithms()
Returns a
List of ProviderAlgorithmInfo objects
that denote the algorithms supported by this provider. |
static CryptKey |
CryptKey.importKey(CryptProvider provider,
byte[] key,
CryptKey hPubKey,
int flags)
Imports a key in to CAPI and returns a handle to the newly imported key.
|
static CapiPrivateKey |
CryptKey.importPrivateKey(CryptProvider provider,
java.security.PrivateKey privateKey,
KeySpec keySpec,
int flags,
boolean forceSecureKeyImport)
Imports the provided software-based private key into MSCAPI, using the
provided key specifier to determine the MSCAPI key algorithm for the key.
|
static CapiPrivateKey |
CryptKey.importPrivateKey(CryptProvider provider,
java.security.PrivateKey privateKey,
KeyUsage keyUsage,
int flags,
boolean forceSecureKeyImport)
Imports the provided software-based private key into MSCAPI, using the
provided key usage to determine the MSCAPI key algorithm for the key.
|
static CertStore |
CertStore.openStore(CertStoreProvType storeProviderType,
int encodingType,
CryptProvider cryptProvider,
int flags,
java.lang.String parameter)
Opens a certificate store and returns a handle to the newly opened store.
|
static CertStore |
CertStore.openSystemStore(CryptProvider cryptProvider,
java.lang.String storeName)
Opens a system certificate store and returns a handle to the newly
opened store.
|
void |
CertContext.setCertificateProperty(CertPropertyId propertyId,
java.lang.Object property)
Sets the indicated certificate property.
|
void |
CryptProvider.setCSPParam(ProviderParam providerParam,
byte[] cspValue)
Sets the value of a CSP parameter associated with this CryptProvider in
MSCAPI.
|
void |
CryptHash.setHashValue(byte[] hashValue)
Sets the actual bytes of the hash, so that an arbitrary byte array can be
signed.
|
void |
CryptKey.setKeyParam(KeyParam keyParamId,
byte[] keyParamValue)
Sets the value of a parameter associated with this key in MSCAPI.
|
void |
CryptHash.update(byte[] input,
int offset,
int length)
Updates the hash with the given input data, starting at the given offset,
and hashing the given length.
|
| Constructor and Description |
|---|
CryptKeyProvInfo(CryptKey cryptKey)
A constructor; creates a
CryptKeyProvInfo that represents
the provided MSAPI key. |
| Modifier and Type | Method and Description |
|---|---|
static void |
CapiCredentialWriter.eraseIdentity(CapiIdentity identityToErase)
Remove all certificates and keys associated with the given identity
from CAPI.
|
static CapiIdentities |
CapiIdentities.findIdentities()
Searches the "MY" certificate store of the currently logged in Windows
user for certificates that can be used to log in to a
User
object. |
static CapiIdentities |
CapiIdentities.findIdentities(CapiCertFilter filter)
Searches the "MY" certificate store of the currently logged in Windows
user for certificates that can be used to log in to a
User
object. |
static CapiIdentities |
CapiIdentities.findIdentities(CapiCertFilter filter,
CapiIdentityFilter idfilter)
Searches the "MY" certificate store of the currently logged in Windows
user for certificates that can be used to log in to a
User
object. |
static CapiIdentity |
CapiIdentities.findIdentity(CapiCertFilter filter)
This method returns the first CapiIdentity found after searching for identities
with the specific filter.
|
abstract java.lang.String |
CapiCSPConfig.getAnySCCSPName(java.lang.String CertDefnName,
java.lang.String[] cspList)
This method is used when generating the keys in CAPI.
|
java.lang.String |
CapiCSPConfigESP.getAnySCCSPName(java.lang.String CertDefnName,
java.lang.String[] cspList)
This method will only ever call
CapiCSPConfigESP.getAnySCCSPSelection(String, String[])
once. |
abstract java.lang.String |
CapiCSPConfigESP.getAnySCCSPSelection(java.lang.String CertDefnName,
java.lang.String[] cspList)
This method will be called when there is more than 1 smart card
CSP installed on the System and the "Any SmartCard" policy has
been selected in the PKI.
|
java.lang.String |
CapiCSPConfig.getDefaultCSP()
Return the default CSP used when generating the keys in CAPI.
|
static CertStore |
CapiIdentities.getIdentityCertStore(java.lang.String storeName)
This method is used to get the CertStore that is used when
retrieving identities.
|
static CapiPrivateKey |
CapiPrivateKey.getInstance(CryptKey cryptKey)
Creates and returns a
CapiPrivateKey using with an already initialized
CAPI provider and key. |
| Constructor and Description |
|---|
CertIdentityCertFilter(AlgorithmID digestAlgID,
byte[] digestValue)
This constructor searches for an identity based on a certificate
hash value of the given type.
|
CertIdentityCertFilter(CapiContainerName capiContainerName)
This can be used to find all certificates in that particular identity.
|
CertIdentityCertFilter(CertContext context)
Constructor used to filter out certificates that are not part of the same
identity.
|
CertIdentityCertFilter(java.security.Principal subjectDN)
This constructor takes a Principal which represents the
Subject Name of a Certificate as the criteria for filtering
acceptable certificates.
|
CertIdentityCertFilter(X509Certificate cert)
This constructor takes an X509Certificate and uses the SubjectName
as the criteria for filtering acceptable certificates.
|
| Modifier and Type | Method and Description |
|---|---|
void |
CapiDigest.createCapiHash(CryptProvider provider)
Create the internal native CAPI hasher.
|
void |
Ssl3ShaMd5Capi.createCapiHash(CryptProvider provider) |
| Constructor and Description |
|---|
CapiCS(java.lang.String[] searchStores)
This constructor allows the CapiCS to be configured to search using
specific certificate stores in CAPI.
|