Change verifier configuration
The following discussion from !183 (merged) should be addressed:
-
@bhawthorne started a discussion: (+2 comments) These getters/setters might not make sense in the context of this class because they indicate that a
JsonProductStorage
object now has these properties on it, when it is really theverifier
that has them. Since this class is a "has-a" relationship withSignatureVerifier
if we're going to expose the verifier methods from this it might make more sense to just have a getter/setter of theverifier
rather than having wrapper getter/setters around that classpublic SignatureVerifier getSignatureVerifier() { return this.verifier; } // Setter if we want to allow changing the verifier on the fly?
Which will change the responsibility of classes interacting with this to change the properties directly on the verifier
storage.getSignatureVerifier().setRejectInvalidSignatures(true);
... On the other hand the verifier is completely internal to this class so the outside world doesn't really know it is a "has-a" relationship, and the
FileProductStorage
is setup the same way as this it looks like.Just something to think about its fine either way.