Interface EventSigner
-
- All Known Implementing Classes:
SystemEventSigner
,UserEventSigner
public interface EventSigner
Simple interface that performs in-place signing of anEiffelEvent
. The selection of the key to be used is left to the implementing classes.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
sign(EiffelEvent event)
Request signing of the given event using a private key and identity.
-
-
-
Method Detail
-
sign
boolean sign(@NonNull EiffelEvent event) throws InvalidCertificateConfigurationException, InvalidKeyException, JsonCanonicalizationException, KeyStoreException, NoSuchAlgorithmException, SignatureException, UnrecoverableKeyException, UnsupportedAlgorithmException
Request signing of the given event using a private key and identity. Based on its configuration, the implementation may choose to not sign the event.- Parameters:
event
- theEiffelEvent
to sign in place- Returns:
- true if the event was signed, false otherwise
- Throws:
InvalidCertificateConfigurationException
- if the keystore in the certificate credential was entirely empty or its first item didn't contain a certificate with a private keyInvalidKeyException
- if the given private key was invalidJsonCanonicalizationException
- if there was an error serializing the event to canonical JSON formKeyStoreException
- if theKeyStore
hasn't been initialized (shouldn't happen and indicates a bug)NoSuchAlgorithmException
- if the algorithm needed to decrypt the key isn't availableSignatureException
- if there's a general problem in the signing processUnrecoverableKeyException
- if the key couldn't be decrypted, e.g. because the password is wrongUnsupportedAlgorithmException
- if the credential's signature algorithm isn't supported by this implementation of the Eiffel protocol or the available cryptography provider
-
-