Class X509PemStringsSecret
java.lang.Object
jadex.ipc.impl.security.authentication.AbstractAuthenticationSecret
jadex.ipc.impl.security.authentication.AbstractX509PemSecret
jadex.ipc.impl.security.authentication.X509PemStringsSecret
- All Implemented Interfaces:
Cloneable
Secret based on inline PEM-encoded X.509 certificates and key.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StringThe local certificate.protected StringThe local certificate key.static final StringPrefix used to encode secret type as strings.Fields inherited from class jadex.ipc.impl.security.authentication.AbstractAuthenticationSecret
SECRET_TYPES -
Constructor Summary
ConstructorsConstructorDescriptionX509PemStringsSecret(String encodedstring) X509PemStringsSecret(String cert, String key) Creates the secret. -
Method Summary
Methods inherited from class jadex.ipc.impl.security.authentication.AbstractAuthenticationSecret
clone, fromKeyPair, fromString, fromString, main
-
Field Details
-
PREFIX
Prefix used to encode secret type as strings.- See Also:
-
cert
The local certificate. -
key
The local certificate key.
-
-
Constructor Details
-
X509PemStringsSecret
-
X509PemStringsSecret
Creates the secret.- Parameters:
cert- Path to the local certificate.key- Path to the local certificate key.cacert- Path to the trust anchor certificate.
-
-
Method Details
-
canSign
public boolean canSign()Tests if the secret can be used for signing or, alternatively, verification only.- Specified by:
canSignin classAbstractAuthenticationSecret- Returns:
- True, if the secret can be used for signing.
-
openCertificate
Opens the local certificate.- Specified by:
openCertificatein classAbstractX509PemSecret- Returns:
- The local certificate.
-
openPrivateKey
Opens the private key used for signing.- Specified by:
openPrivateKeyin classAbstractX509PemSecret- Returns:
- The private key.
-
hashCode
public int hashCode()Hashcode.- Overrides:
hashCodein classAbstractAuthenticationSecret
-
equals
Equals.- Overrides:
equalsin classAbstractAuthenticationSecret
-
toString
Converts to encoded string.
-