Class X509PemFilesSecret
java.lang.Object
jadex.ipc.impl.security.authentication.AbstractAuthenticationSecret
jadex.ipc.impl.security.authentication.AbstractX509PemSecret
jadex.ipc.impl.security.authentication.X509PemFilesSecret
- All Implemented Interfaces:
Cloneable
Secret based on PEM-encoded X.509 certificate files and key.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String
The local certificate.protected String
The local certificate key.static final String
Prefix used to encode secret type as strings.Fields inherited from class jadex.ipc.impl.security.authentication.AbstractAuthenticationSecret
SECRET_TYPES
-
Constructor Summary
ConstructorsConstructorDescriptionX509PemFilesSecret
(String encodedstring) X509PemFilesSecret
(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
-
X509PemFilesSecret
-
X509PemFilesSecret
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:
canSign
in classAbstractAuthenticationSecret
- Returns:
- True, if the secret can be used for signing.
-
openCertificate
Opens the local certificate.- Specified by:
openCertificate
in classAbstractX509PemSecret
- Returns:
- The local certificate.
-
openPrivateKey
Opens the private key used for signing.- Specified by:
openPrivateKey
in classAbstractX509PemSecret
- Returns:
- The private key.
-
hashCode
public int hashCode()Hashcode generation.- Overrides:
hashCode
in classAbstractAuthenticationSecret
-
equals
Equals.- Overrides:
equals
in classAbstractAuthenticationSecret
-
toString
Converts to encoded string.
-