Code example for PolicyQualifierInfo

Methods: getPolicyQualifierId

0
        // change OID to 1.3.98437.82818.1 
        encoding[5] = (byte)0x86;
        encoding[6] = (byte)0x81;
        encoding[8] = (byte)0x85;
        encoding[9] = (byte)0x87;
        i = new PolicyQualifierInfo(encoding);
        // get OID as String and check it 
        assertEquals("1.3.98437.82818.1", i.getPolicyQualifierId());
    } 
 
    /** 
     * Test for <code>toString()</code> method 
     * Assertion: returns description of the contents of this 
     * <code>PolicyQualifierInfo</code> as printable <code>String</code> 
     * @throws IOException 
     *  
     * @throws IOException 
     */ 
    public final void testToString() throws IOException { 
        // get valid encoding 
        byte[] encoding = getDerEncoding();