Class OpensslNamespacePolicyImpl
java.lang.Object
eu.emi.security.authn.x509.helpers.ns.OpensslNamespacePolicyImpl
- All Implemented Interfaces:
NamespacePolicy
Represents a namespace policy, i.e. defines which subject DNs are permitted or denied for an issuer.
- Author:
- K. Benedyczak
-
Constructor Summary
ConstructorsConstructorDescriptionOpensslNamespacePolicyImpl
(String issuer, String subject, String definedForSubject, boolean permit, String identification) -
Method Summary
Modifier and TypeMethodDescriptionboolean
isPermit()
boolean
isSubjectMatching
(X500Principal subject) Checks whether the given subject name is matching this policy.
-
Constructor Details
-
OpensslNamespacePolicyImpl
public OpensslNamespacePolicyImpl(String issuer, String subject, String definedForSubject, boolean permit, String identification) throws IOException - Throws:
IOException
-
-
Method Details
-
getIssuer
- Specified by:
getIssuer
in interfaceNamespacePolicy
- Returns:
- the issuer
-
getSuject
- Returns:
- the subject
-
isPermit
public boolean isPermit()- Specified by:
isPermit
in interfaceNamespacePolicy
- Returns:
- whether the policy is permit or deny
-
getIdentification
- Specified by:
getIdentification
in interfaceNamespacePolicy
- Returns:
- the identification
-
isSubjectMatching
Checks whether the given subject name is matching this policy.- Specified by:
isSubjectMatching
in interfaceNamespacePolicy
- Parameters:
subject
- to be checked- Returns:
- true if subject is matched, false otherwise
-
getDefinedFor
- Specified by:
getDefinedFor
in interfaceNamespacePolicy
- Returns:
- hash of the CA where the policy is defined. It can be the
NamespacePolicy.getIssuer()
hash or it may be its parent CA subject name hash, if the namespace was defined in its namespaces file.
-