Class OpensslNamespacePolicyImpl

  • All Implemented Interfaces:
    NamespacePolicy

    public class OpensslNamespacePolicyImpl
    extends java.lang.Object
    implements NamespacePolicy
    Represents a namespace policy, i.e. defines which subject DNs are permitted or denied for an issuer.
    Author:
    K. Benedyczak
    • Constructor Summary

      Constructors 
      Constructor Description
      OpensslNamespacePolicyImpl​(java.lang.String issuer, java.lang.String subject, java.lang.String definedForSubject, boolean permit, java.lang.String identification)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getDefinedFor()  
      java.lang.String getIdentification()  
      java.lang.String getIssuer()  
      java.lang.String getSuject()  
      boolean isPermit()  
      boolean isSubjectMatching​(javax.security.auth.x500.X500Principal subject)
      Checks whether the given subject name is matching this policy.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • OpensslNamespacePolicyImpl

        public OpensslNamespacePolicyImpl​(java.lang.String issuer,
                                          java.lang.String subject,
                                          java.lang.String definedForSubject,
                                          boolean permit,
                                          java.lang.String identification)
                                   throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • getIssuer

        public java.lang.String getIssuer()
        Specified by:
        getIssuer in interface NamespacePolicy
        Returns:
        the issuer
      • getSuject

        public java.lang.String getSuject()
        Returns:
        the subject
      • isPermit

        public boolean isPermit()
        Specified by:
        isPermit in interface NamespacePolicy
        Returns:
        whether the policy is permit or deny
      • isSubjectMatching

        public boolean isSubjectMatching​(javax.security.auth.x500.X500Principal subject)
        Checks whether the given subject name is matching this policy.
        Specified by:
        isSubjectMatching in interface NamespacePolicy
        Parameters:
        subject - to be checked
        Returns:
        true if subject is matched, false otherwise
      • getDefinedFor

        public java.lang.String getDefinedFor()
        Specified by:
        getDefinedFor in interface NamespacePolicy
        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.