Package org.apache.wss4j.common.crypto
Class CryptoType
java.lang.Object
org.apache.wss4j.common.crypto.CryptoType
This class represents a way of passing information to the Crypto.getX509Certificates() method.
The TYPE enum describes which method to use to retrieve the Certificate(s). The corresponding
get accessor must be set accordingly.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumTYPE.ISSUER_SERIAL - A certificate (chain) is located by the issuer name and serial number TYPE.THUMBPRINT_SHA1 - A certificate (chain) is located by the SHA1 of the (root) cert TYPE.SKI_BYTES - A certificate (chain) is located by the SKI bytes of the (root) cert TYPE.SUBJECT_DN - A certificate (chain) is located by the Subject DN of the (root) cert TYPE.ALIAS - A certificate (chain) is located by an alias. -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructorCryptoType(CryptoType.TYPE type) Constructor with a TYPE argument -
Method Summary
Modifier and TypeMethodDescriptiongetAlias()Get the alias of the cert (chain) to locate.byte[]getBytes()Get the array of bytes, which could be the SHA1 thumbprint, or SKI bytes of the cert.Get the endpoint to locate certificate.Get the issuer String.Get the serial numberGet the Subject DN of the cert (chain) to locategetType()Get the typevoidSet the alias of the cert (chain) to locate.voidsetBytes(byte[] bytes) Set the byte[], which could be the SHA1 thumbprint, or SKI bytes of the cert.voidsetEndpoint(String endpoint) Set the endpoint to locate certificate.voidsetIssuerSerial(String issuer, BigInteger serial) Set the Issuer String, and Serial number of the cert (chain) to retrieve.voidsetSubjectDN(String subjectDN) Set the Subject DN of the cert (chain) to locatevoidsetType(CryptoType.TYPE type) Set the type.
-
Constructor Details
-
CryptoType
public CryptoType()Default constructor -
CryptoType
Constructor with a TYPE argument- Parameters:
type- describes which method to use to retrieve a certificate (chain)
-
-
Method Details
-
setType
Set the type.- Parameters:
type- describes which method to use to retrieve a certificate (chain)
-
getType
Get the type- Returns:
- which method to use to retrieve a certificate (chain)
-
setIssuerSerial
Set the Issuer String, and Serial number of the cert (chain) to retrieve.- Parameters:
issuer- the issuer Stringserial- the serial number
-
getIssuer
Get the issuer String.- Returns:
- the issuer String
-
getSerial
Get the serial number- Returns:
- the serial number
-
setBytes
public void setBytes(byte[] bytes) Set the byte[], which could be the SHA1 thumbprint, or SKI bytes of the cert.- Parameters:
bytes- an array of bytes
-
getBytes
public byte[] getBytes()Get the array of bytes, which could be the SHA1 thumbprint, or SKI bytes of the cert.- Returns:
- an array of bytes
-
setSubjectDN
Set the Subject DN of the cert (chain) to locate- Parameters:
subjectDN- the Subject DN of the cert (chain) to locate
-
getSubjectDN
Get the Subject DN of the cert (chain) to locate- Returns:
- the Subject DN of the cert (chain) to locate
-
setAlias
Set the alias of the cert (chain) to locate.- Parameters:
alias- the alias of the cert (chain) to locate.
-
getAlias
Get the alias of the cert (chain) to locate.- Returns:
- the alias of the cert (chain) to locate.
-
setEndpoint
Set the endpoint to locate certificate.- Parameters:
endpoint- to locate.
-
getEndpoint
Get the endpoint to locate certificate.- Returns:
- endpoint to locate certificate.
-