Examples of PKIStatusInfo


Examples of org.apache.harmony.security.x509.tsp.PKIStatusInfo

     */
    public void testGetEncoded() throws IOException {
        ArrayList statusStr = new ArrayList(2);
        statusStr.add("one");
        statusStr.add("two");
        PKIStatusInfo info = new PKIStatusInfo(PKIStatus.REJECTION, statusStr,
                PKIFailureInfo.BAD_DATA_FORMAT);
        byte [] encoding = PKIStatusInfo.ASN1.encode(info);
        PKIStatusInfo decoded = (PKIStatusInfo) PKIStatusInfo.ASN1
                .decode(encoding);
       
        assertEquals(info.getStatus(), decoded.getStatus());
        List decodedStString = decoded.getStatusString();
        assertNotNull(decodedStString);
        assertEquals("one", decodedStString.get(0));
        assertEquals("two", decodedStString.get(1));
        assertEquals(info.getFailInfo(), decoded.getFailInfo());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.