Package org.pgpainless.util
Class NotationRegistry
- java.lang.Object
-
- org.pgpainless.util.NotationRegistry
-
public class NotationRegistry extends Object
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, calladdKnownNotation(String)
.
-
-
Constructor Summary
Constructors Constructor Description NotationRegistry()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
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 Detail
-
NotationRegistry
public NotationRegistry()
-
-
Method Detail
-
addKnownNotation
public void addKnownNotation(String notationName)
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
public boolean isKnownNotation(String notationName)
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.
-
-