Package codec.x509

Examples of codec.x509.GeneralName


            System.out.println("");
            System.out.println("ORAddress:");
            printAsHex(8, "", " ", ora.getEncoded());
            System.out.println("");
           
            GeneralName gName = new GeneralName(ora);
            System.out.println("GeneralName:");
            printAsHex(8, "", " ", gName.getEncoded());
            System.out.println("");

            GeneralNames gNames = new GeneralNames();
            gNames.addName(gName);
            System.out.println("GeneralNames:");
View Full Code Here


    /**
     * @com.intel.drl.spec_ref
     */
    public void addSubjectAlternativeName(int tag, String name)
                                                       throws IOException {
        GeneralName alt_name = new GeneralName(tag, name);
        // create only if there was not any errors
        if (subjectAltNames == null) {
            subjectAltNames = new ArrayList[9];
        }
        if (subjectAltNames[tag] == null) {
View Full Code Here

    /**
     * @com.intel.drl.spec_ref
     */
    public void addSubjectAlternativeName(int tag, byte[] name)
                                            throws IOException {
        GeneralName alt_name = new GeneralName(tag, name);
        // create only if there was not any errors
        if (subjectAltNames == null) {
            subjectAltNames = new ArrayList[9];
        }
        if (subjectAltNames[tag] == null) {
View Full Code Here

    /**
     * @com.intel.drl.spec_ref
     */
    public void addPathToName(int type, String name) throws IOException {
        GeneralName path_name = new GeneralName(type, name);
        // create only if there was not any errors
        if (pathToNames == null) {
            pathToNames = new ArrayList();
        }
        pathToNames.add(path_name);
View Full Code Here

    /**
     * @com.intel.drl.spec_ref
     */
    public void addPathToName(int type, byte[] name) throws IOException {
        GeneralName path_name= new GeneralName(type, name);
        // create only if there was not any errors
        if (pathToNames == null) {
            pathToNames = new ArrayList();
        }
        pathToNames.add(path_name);
View Full Code Here

            return null;
        }
        ArrayList result = new ArrayList();
        Iterator it = pathToNames.iterator();
        while (it.hasNext()) {
            GeneralName name = (GeneralName) it.next();
            result.add(name.getAsList());
        }
        return result;
    }
View Full Code Here

                                ? new boolean[0]
                                : new boolean[subjectAltNames[i].size()];
                }
                Iterator it = sans.iterator();
                while (it.hasNext()) {
                    GeneralName name = (GeneralName) it.next();
                    int tag = name.getTag();
                    for (int i=0; i<map[tag].length; i++) {
                        if (((GeneralName) subjectAltNames[tag].get(i))
                                                            .equals(name)) {
                            if (!matchAllNames) {
                                break PASSED;
View Full Code Here

        boolean[]   subjectUniqueID = new boolean[]
                    {false, true, false, true, false, true, false, true}; // random value
        // make the Extensions for TBSCertificate
        // Subject Alternative Names
        GeneralName[] san = new GeneralName[] {
            new GeneralName(
                new OtherName("1.2.3.4.5",
                        ASN1Integer.getInstance().encode(
                                BigInteger.valueOf(55L).toByteArray()))),
            new GeneralName(1, "rfc@822.Name"),
            new GeneralName(2, "dNSName"),
            new GeneralName(new ORAddress()),
            new GeneralName(4, "O=Organization"),
            new GeneralName(new EDIPartyName("assigner","party")),
            new GeneralName(6, "http://Resource.Id"),
            new GeneralName(new byte[] {1, 1, 1, 1}),
            new GeneralName(8, "1.2.3.4444.55555")
        };
        GeneralNames sans = new GeneralNames(Arrays.asList(san));
        Extension extension = new Extension("2.5.29.17", true, sans.getEncoded());
        Extensions extensions = new Extensions();
        extensions.addExtension(extension);
View Full Code Here

        System.out.println("");
        System.out.println("ORAddress:");
        printAsHex(8, "", " ", ora.getEncoded());
        System.out.println("");
       
        GeneralName gName = new GeneralName(ora);
        System.out.println("GeneralName:");
        printAsHex(8, "", " ", gName.getEncoded());
        System.out.println("");

        GeneralNames gNames = new GeneralNames();
        gNames.addName(gName);
        System.out.println("GeneralNames:");
View Full Code Here

                sha1), new byte[20]);
        Date genTime = new Date();
        BigInteger nonce = BigInteger.valueOf(1234567890L);
        // accuracy is 1 second
        int[] accuracy = new int[] { 1, 0, 0 };
        GeneralName tsa = new GeneralName(new Name("CN=AnAuthority"));
        Extensions exts = new Extensions();
        // Time-Stamping extension OID: as defined in RFC 3161
        int[] timeStampingExtOID = new int[] { 1, 3, 6, 1, 5, 5, 7, 3, 8 };
        byte[] timeStampingExtValue = new byte[] { (byte) 1, (byte) 2, (byte) 3 };
        Extension ext = new Extension(timeStampingExtOID, true,
View Full Code Here

TOP

Related Classes of codec.x509.GeneralName

Copyright © 2018 www.massapicom. 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.