public interface KeyStoreUtils
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT |
static java.lang.String |
VERSION |
Modifier and Type | Method and Description |
---|---|
java.util.List<byte[]> |
getAllCertificates(java.lang.String keystoreName)
Get all certificates from given keystore
|
java.lang.String |
getAndValidateJWKByURL(java.lang.String keystoreName,
java.lang.String jwkURI)
Validate the keystore against the URL passed and return a JWKSet if validation is successful.
|
java.lang.String |
getBase64EncodedThumbprintFromKeystore(java.lang.String keystoreName,
java.lang.String alias,
boolean isSha256ThumbprintHeader)
Returns base 64 representation of thumbprint bytes given a keystore and alias
|
java.security.cert.Certificate |
getCertificate(java.lang.String keystoreName,
java.lang.String alias)
Get certificate from given keystore and alias
|
java.lang.String |
getCertificateAlias(java.lang.String keystoreName,
java.security.cert.Certificate cert) |
byte[] |
getCertificateByAlias(java.lang.String keystoreName,
java.lang.String alias) |
java.security.cert.X509Certificate |
getCertificateFromTrustStoreByIssuerNameSerial(java.lang.String trustStoreName,
java.lang.String issuerName,
java.math.BigInteger serialNumber) |
java.security.cert.X509Certificate |
getCertificateFromTrustStoreBySKI(java.lang.String trustStoreName,
byte[] ski) |
java.lang.String |
getCertificateIssuerNameAndSerialByAlias(java.lang.String keystoreName,
java.lang.String alias)
Gets the Issuer Name and serial number based on keystrename and alias.
|
java.security.cert.Certificate |
getCertificateUsingThumbprint(byte[] currentthumbPrint,
java.lang.String keystoreName,
boolean isSha256ThumbprintHeader)
Gets the certificate corresponding to a given certificate thumbprint represented in the form of bytes.
|
long |
getDataPageReloadTime(ClipboardPage dataPage)
Calculate data page reload time from input datapage instance
|
long |
getDataPageReloadTime(ClipboardPage dataPage,
PRThread pThread)
Calculate data page reload time from input datapage instance
|
java.lang.String |
getJWKKeyStore(ClipboardPage keystore)
Get JWK Keys in JSON string format using the keystore data instance clipboard
page
|
java.lang.String |
getJWKKeyStore(ClipboardPage keystore,
PRThread prThread)
Get JWK Keys in JSON string format using the keystore data instance clipboard
page
|
java.lang.String |
getJWKKeyStore(java.lang.String keystoreName)
Given the keystoreName, return JWK keys in JSon string format.
|
java.lang.String |
getJWKKeyStore(java.lang.String keystoreName,
PRThread prThread)
Given the keystoreName, return JWK keys in JSon string format.
|
java.security.Key |
getKey(java.lang.String keystoreName,
java.lang.String alias,
java.lang.String password) |
java.security.KeyStore |
getKeystore(ClipboardPage keystore)
Get the java.security.Keystore instance using the keystore data
instance clipboard page
|
java.security.KeyStore |
getKeystore(ClipboardPage keystore,
PRThread prThread)
Create the java.security.Keystore instance using the keystore data
instance clipboard page
|
java.security.KeyStore |
getKeystore(java.lang.String keystoreName)
Given the keystoreName, return java.security.Keystore instance.
|
java.security.KeyStore |
getKeystore(java.lang.String keystoreName,
PRThread prThread)
Given the keystoreName, return java.security.Keystore instance.
|
java.util.List<java.lang.String> |
getKeyStoreAliases(java.lang.String keystoreName)
Gets the keystore alias list.
|
ClipboardPage |
getKeystoreInstance(java.lang.String keystoreName)
Returns the Keystore instance for the given keystoreName
|
ClipboardPage |
getKeystoreInstance(java.lang.String keystoreName,
PRThread pThread)
Returns the Keystore instance for the given keystoreName.
|
java.lang.String |
getKeystoreSourceLocationType(java.lang.String aKeyStoreName) |
java.lang.String |
getKID(java.lang.String keystoreName,
java.lang.String alias)
API to get KID for the given keystore and alias
|
java.security.PublicKey |
getPublicKey(java.lang.String truststore,
java.lang.String alias)
Get PublicKey for the given KID or Alias
|
void |
invalidateKeyStore(java.lang.String aKeyStoreName)
Remove given keystore from cache immediately.
|
boolean |
isKeystoreSourceLocationKMS(ClipboardPage aKeyStorePage) |
boolean |
isKeystoreSourceLocationKMS(java.lang.String aKeyStoreName) |
boolean |
isPublicKeyPresent(java.lang.String aKeystoreName,
java.nio.ByteBuffer publicKeyEncodedBytes)
checks if a given public key is present in the keystore cache.
|
void |
loadKeystore(java.io.InputStream aKeystore)
Just pass keystore input stream to keystore layer.
|
boolean |
validate(PublicAPI tools,
ClipboardPage myStepPage)
API to validate keystore properties
|
static final java.lang.String COPYRIGHT
static final java.lang.String VERSION
java.security.KeyStore getKeystore(java.lang.String keystoreName)
keystoreName
- java.security.KeyStore getKeystore(java.lang.String keystoreName, PRThread prThread)
keystoreName
- prThread
- provides requestor contextjava.lang.String getJWKKeyStore(java.lang.String keystoreName)
keystoreName
- java.lang.String getJWKKeyStore(java.lang.String keystoreName, PRThread prThread)
keystoreName
- prThread
- provides requestor contextjava.util.List<java.lang.String> getKeyStoreAliases(java.lang.String keystoreName)
keystoreName
- key store Namejava.util.List<byte[]> getAllCertificates(java.lang.String keystoreName)
keystoreName
- Name of the keystorejava.security.cert.Certificate getCertificate(java.lang.String keystoreName, java.lang.String alias)
keystoreName
- Name of the keystorealias
- certificate aliasjava.security.KeyStore getKeystore(ClipboardPage keystore)
keystore
- the PRPC keystore data instance clipboard pagejava.security.KeyStore getKeystore(ClipboardPage keystore, PRThread prThread)
keystore
- the PRPC keystore data instance clipboard pageprThread
- provides requestor contextjava.lang.String getJWKKeyStore(ClipboardPage keystore)
keystore
- the PRPC keystore data instance clipboard pagejava.lang.String getJWKKeyStore(ClipboardPage keystore, PRThread prThread)
keystore
- the PRPC keystore data instance clipboard pageprThread
- provides requestor contextbyte[] getCertificateByAlias(java.lang.String keystoreName, java.lang.String alias)
ClipboardPage getKeystoreInstance(java.lang.String keystoreName) throws DatabaseException
keystoreName
- DatabaseException
ClipboardPage getKeystoreInstance(java.lang.String keystoreName, PRThread pThread) throws DatabaseException
keystoreName
- pThread
- provides requestor contextDatabaseException
java.lang.String getCertificateIssuerNameAndSerialByAlias(java.lang.String keystoreName, java.lang.String alias)
keystoreName
- alias
- boolean validate(PublicAPI tools, ClipboardPage myStepPage)
tools
- myStepPage
- java.lang.String getKID(java.lang.String keystoreName, java.lang.String alias)
keystoreName
- alias
- void loadKeystore(java.io.InputStream aKeystore)
aKeystore
- long getDataPageReloadTime(ClipboardPage dataPage)
dataPage
- long getDataPageReloadTime(ClipboardPage dataPage, PRThread pThread)
dataPage
- pThread
- provides requestor contextvoid invalidateKeyStore(java.lang.String aKeyStoreName)
aKeyStoreName
- java.security.PublicKey getPublicKey(java.lang.String truststore, java.lang.String alias) throws DatabaseException, java.security.KeyStoreException
truststore
- alias
- , it can be alias or KIDDatabaseException
java.security.KeyStoreException
java.security.Key getKey(java.lang.String keystoreName, java.lang.String alias, java.lang.String password)
keystoreName
- alias
- password
- boolean isPublicKeyPresent(java.lang.String aKeystoreName, java.nio.ByteBuffer publicKeyEncodedBytes)
aKeystoreName
- publicKeyEncodedBytes
- java.lang.String getAndValidateJWKByURL(java.lang.String keystoreName, java.lang.String jwkURI)
keystoreName
- jwkURI
- java.security.cert.Certificate getCertificateUsingThumbprint(byte[] currentthumbPrint, java.lang.String keystoreName, boolean isSha256ThumbprintHeader) throws java.io.IOException
currentthumbPrint
- keystoreName
- isSha256ThumbprintHeader
- java.io.IOException
java.lang.String getBase64EncodedThumbprintFromKeystore(java.lang.String keystoreName, java.lang.String alias, boolean isSha256ThumbprintHeader)
keystoreName
- alias
- isSha256ThumbprintHeader
- java.lang.String getKeystoreSourceLocationType(java.lang.String aKeyStoreName)
aKeyStoreName
- boolean isKeystoreSourceLocationKMS(java.lang.String aKeyStoreName)
aKeyStoreName
- boolean isKeystoreSourceLocationKMS(ClipboardPage aKeyStorePage)
aKeyStorePage
- java.security.cert.X509Certificate getCertificateFromTrustStoreByIssuerNameSerial(java.lang.String trustStoreName, java.lang.String issuerName, java.math.BigInteger serialNumber)
trustStoreName
- issuerName
- serialNumber
- java.security.cert.X509Certificate getCertificateFromTrustStoreBySKI(java.lang.String trustStoreName, byte[] ski) throws java.io.IOException
trustStoreName
- ski
- java.io.IOException
java.lang.String getCertificateAlias(java.lang.String keystoreName, java.security.cert.Certificate cert)
keystoreName
- cert
- Copyright © 2018 Pegasystems Inc. All Rights Reserved.