Class EventSigner
java.lang.Object
com.axis.jenkins.plugins.eiffel.eiffelbroadcaster.signing.EventSigner
- Direct Known Subclasses:
SystemEventSigner,UserEventSigner
Simple interface that performs in-place signing of an
EiffelEvent.
The selection of the key to be used is left to the implementing classes.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract booleansign(EiffelEvent event) Request signing of the given event using a private key and identity.
-
Constructor Details
-
EventSigner
public EventSigner()
-
-
Method Details
-
sign
public abstract 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- theEiffelEventto 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 theKeyStorehasn'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
-