Package sun.security.validator

Examples of sun.security.validator.Validator.validate()


        ks.setCertificateEntry("ca2", createPath(c2)[0]);
        Validator v = Validator.getInstance
            (Validator.TYPE_PKIX, Validator.VAR_GENERIC, ks);
        // Validating chain (u1, c1)
        X509Certificate[] chain1 = createPath(u1 + c1);
        for (X509Certificate c: v.validate(chain1)) {
            System.out.println("   " + c.getSubjectX500Principal() +
                    " issued by " + c.getIssuerX500Principal());
        }
        // Validating chain (u2, c2)
        X509Certificate[] chain2 = createPath(u2 + c2);
View Full Code Here


            System.out.println("   " + c.getSubjectX500Principal() +
                    " issued by " + c.getIssuerX500Principal());
        }
        // Validating chain (u2, c2)
        X509Certificate[] chain2 = createPath(u2 + c2);
        for (X509Certificate c: v.validate(chain2)) {
            System.out.println("   " + c.getSubjectX500Principal() +
                    " issued by " + c.getIssuerX500Principal());
        }
    }
View Full Code Here

        KeyStore ks = KeyStore.getInstance("JKS");
        ks.load(new ByteArrayInputStream(ca), "changeit".toCharArray());
        Validator v = Validator.getInstance
            (Validator.TYPE_PKIX, Validator.VAR_GENERIC, ks);
        X509Certificate[] chain = createPath();
        for (X509Certificate c: v.validate(chain)) {
            System.out.println("   " + c.getSubjectX500Principal() +
                    " issued by " + c.getIssuerX500Principal());
        }
    }
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.