Class ProxyPolicy

  • All Implemented Interfaces:
    org.bouncycastle.asn1.ASN1Encodable

    public class ProxyPolicy
    extends java.lang.Object
    implements org.bouncycastle.asn1.ASN1Encodable
    Represents the policy part of the ProxyCertInfo extension.
     ProxyPolicy ::= SEQUENCE { policyLanguage    OBJECT IDENTIFIER, policy OCTET STRING OPTIONAL } 
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static org.bouncycastle.asn1.ASN1ObjectIdentifier IMPERSONATION
      Impersonation proxy OID
      static org.bouncycastle.asn1.ASN1ObjectIdentifier INDEPENDENT
      Independent proxy OID
      static org.bouncycastle.asn1.ASN1ObjectIdentifier LIMITED
      Limited proxy OID
    • Constructor Summary

      Constructors 
      Constructor Description
      ProxyPolicy​(java.lang.String policyLanguageOid, byte[] policy)
      Creates a new instance of the ProxyPolicy object.
      ProxyPolicy​(org.bouncycastle.asn1.ASN1ObjectIdentifier policyLanguage)
      Creates a new instance of the ProxyPolicy object with no policy.
      ProxyPolicy​(org.bouncycastle.asn1.ASN1ObjectIdentifier policyLanguage, byte[] policy)
      Creates a new instance of the ProxyPolicy object.
      ProxyPolicy​(org.bouncycastle.asn1.ASN1ObjectIdentifier policyLanguage, java.lang.String policy)
      Creates a new instance of the ProxyPolicy object.
      ProxyPolicy​(org.bouncycastle.asn1.ASN1Sequence seq)
      Creates a new instance of the ProxyPolicy object from given ASN1Sequence object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void checkConstraints()  
      byte[] getPolicy()
      Returns the actual policy embedded in the ProxyPolicy object.
      java.lang.String getPolicyAsString()
      Returns the actual policy embedded in the ProxyPolicy object.
      org.bouncycastle.asn1.ASN1ObjectIdentifier getPolicyLanguage()
      Returns the policy language of the ProxyPolicy.
      org.bouncycastle.asn1.ASN1Primitive toASN1Primitive()
      Returns the DER-encoded ASN.1 representation of proxy policy.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • IMPERSONATION

        public static final org.bouncycastle.asn1.ASN1ObjectIdentifier IMPERSONATION
        Impersonation proxy OID
      • INDEPENDENT

        public static final org.bouncycastle.asn1.ASN1ObjectIdentifier INDEPENDENT
        Independent proxy OID
      • LIMITED

        public static final org.bouncycastle.asn1.ASN1ObjectIdentifier LIMITED
        Limited proxy OID
    • Constructor Detail

      • ProxyPolicy

        public ProxyPolicy​(org.bouncycastle.asn1.ASN1Sequence seq)
        Creates a new instance of the ProxyPolicy object from given ASN1Sequence object.
        Parameters:
        seq - ASN1Sequence object to create the instance from.
      • ProxyPolicy

        public ProxyPolicy​(org.bouncycastle.asn1.ASN1ObjectIdentifier policyLanguage,
                           byte[] policy)
        Creates a new instance of the ProxyPolicy object.
        Parameters:
        policyLanguage - the language policy Oid.
        policy - the policy.
      • ProxyPolicy

        public ProxyPolicy​(java.lang.String policyLanguageOid,
                           byte[] policy)
        Creates a new instance of the ProxyPolicy object.
        Parameters:
        policyLanguageOid - the language policy Oid.
        policy - the policy.
      • ProxyPolicy

        public ProxyPolicy​(org.bouncycastle.asn1.ASN1ObjectIdentifier policyLanguage,
                           java.lang.String policy)
        Creates a new instance of the ProxyPolicy object.
        Parameters:
        policyLanguage - the language policy Oid.
        policy - the policy.
      • ProxyPolicy

        public ProxyPolicy​(org.bouncycastle.asn1.ASN1ObjectIdentifier policyLanguage)
        Creates a new instance of the ProxyPolicy object with no policy.
        Parameters:
        policyLanguage - the language policy Oid.
    • Method Detail

      • toASN1Primitive

        public org.bouncycastle.asn1.ASN1Primitive toASN1Primitive()
        Returns the DER-encoded ASN.1 representation of proxy policy.
        Specified by:
        toASN1Primitive in interface org.bouncycastle.asn1.ASN1Encodable
        Returns:
        DERObject the encoded representation of the proxy policy.
      • checkConstraints

        protected void checkConstraints()
      • getPolicy

        public byte[] getPolicy()
        Returns the actual policy embedded in the ProxyPolicy object.
        Returns:
        the policy in bytes. Might be null.
      • getPolicyAsString

        public java.lang.String getPolicyAsString()
        Returns the actual policy embedded in the ProxyPolicy object.
        Returns:
        the policy as String. Might be null.
      • getPolicyLanguage

        public org.bouncycastle.asn1.ASN1ObjectIdentifier getPolicyLanguage()
        Returns the policy language of the ProxyPolicy.
        Returns:
        the policy language Oid.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object