Package org.pgpainless.util
Class NotationRegistry
java.lang.Object
org.pgpainless.util.NotationRegistry
Registry for known notations.
Since signature verification must reject signatures with critical notations that are not known to the application,
there must be some way to tell PGPainless which notations actually are known.
To add a notation name, call
addKnownNotation(String)
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addKnownNotation
(String notationName) Add a known notation name into the registry.void
clear()
Clear all known notations from the registry.boolean
isKnownNotation
(String notationName) Return true if the notation name is registered in the registry.
-
Constructor Details
-
NotationRegistry
public NotationRegistry()
-
-
Method Details
-
addKnownNotation
Add a known notation name into the registry. This will cause critical notations with that name to no longer invalidate the signature.- Parameters:
notationName
- name of the notation
-
isKnownNotation
Return true if the notation name is registered in the registry.- Parameters:
notationName
- name of the notation- Returns:
- true if notation is known, false otherwise.
-
clear
public void clear()Clear all known notations from the registry.
-