Class CBORAsymKeyValidator
Also see CBORValidator
.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Interface for dynamic key retrieval. -
Constructor Summary
ConstructorDescriptionCBORAsymKeyValidator
(PublicKey publicKey) Creates a validator object with a public key.CBORAsymKeyValidator
(CBORAsymKeyValidator.KeyLocator keyLocator) Creates a validator object with a key locator. -
Method Summary
Methods inherited from class org.webpki.cbor.CBORValidator
setCustomDataPolicy, setTagPolicy, validate
-
Constructor Details
-
CBORAsymKeyValidator
Creates a validator object with a public key.This constructor presumes that the validation key is given by the context and that the supplied algorithm meets the policy.
- Parameters:
publicKey
- The anticipated public key- See Also:
-
CBORAsymKeyValidator
Creates a validator object with a key locator.This constructor provides full control for the verifier regarding in-lined public keys and key identifiers.
If no public key is found in the signature object, the
CBORAsymKeyValidator.KeyLocator
will be called BEFORE signature validation with anull
public key argument. This permits applications to retrieve a suitable key for validation. This is usually done by requiring a key identifier.If on the other a public is found in the signature object, it will be used for signature validation. AFTER successful signature validation, the
CBORAsymKeyValidator.KeyLocator
will be called with the public key argument holding the public key of the signature object. This permits applications to first validate the signature and then lookup the key which may simplify database design.- Parameters:
keyLocator
- KeyLocator implementation
-