Examples of SubjectAlternativeNameExtension


Examples of sun.security.x509.SubjectAlternativeNameExtension

        if (init || !X509CertImpl.isSelfIssued(cert)){
            X500Principal subjName = cert.getSubjectX500Principal();
            subjectNamesTraversed.add(X500Name.asX500Name(subjName));

            try {
                SubjectAlternativeNameExtension subjAltNameExt
                    = icert.getSubjectAlternativeNameExtension();
                if (subjAltNameExt != null) {
                    GeneralNames gNames = (GeneralNames)
                        subjAltNameExt.get(SubjectAlternativeNameExtension.SUBJECT_NAME);
                    for (Iterator<GeneralName> t = gNames.iterator();
                                t.hasNext(); ) {
                        GeneralNameInterface gName = t.next().getName();
                        subjectNamesTraversed.add(gName);
                    }
View Full Code Here

Examples of sun.security.x509.SubjectAlternativeNameExtension

        if (subject.equals(target)) {
            /* match! */
            return 0;
        }

        SubjectAlternativeNameExtension altNameExt =
            certImpl.getSubjectAlternativeNameExtension();
        if (altNameExt != null) {
            GeneralNames altNames =
                (GeneralNames)altNameExt.get(altNameExt.SUBJECT_NAME);
            /* see if any alternative name matches target */
            if (altNames != null) {
                for (int j = 0, n = altNames.size(); j < n; j++) {
                    GeneralNameInterface altName = altNames.get(j).getName();
                    if (altName.equals(target)) {
View Full Code Here

Examples of sun.security.x509.SubjectAlternativeNameExtension

            //                InetAddress ipAddress = new InetAddress.getByName(alternativeName.substring(3));
            //                IPAddressName ipAddressName = new IPAddressName(ipAddress.getAddress());
            IPAddressName ipAddressName = new IPAddressName(alternativeName);
            if( alternativeNames == null ) { alternativeNames = new GeneralNames(); }
            alternativeNames.add(new GeneralName(ipAddressName));
            SubjectAlternativeNameExtension san = new SubjectAlternativeNameExtension(alternativeNames);
            if( certificateExtensions == null ) { certificateExtensions = new CertificateExtensions(); }
            certificateExtensions.set(san.getExtensionId().toString(), san);
            info.set(X509CertInfo.EXTENSIONS, certificateExtensions);
            //   ObjectIdentifier("2.5.29.17") , false, "ipaddress".getBytes()                           
           
        }
        catch(Exception e) {
View Full Code Here

Examples of sun.security.x509.SubjectAlternativeNameExtension

                alternativeName = dns.substring(4);
            }
            DNSName dnsName = new DNSName(alternativeName);
            if( alternativeNames == null ) { alternativeNames = new GeneralNames(); }
            alternativeNames.add(new GeneralName(dnsName));
            SubjectAlternativeNameExtension san = new SubjectAlternativeNameExtension(alternativeNames);
            if( certificateExtensions == null ) { certificateExtensions = new CertificateExtensions(); }
            certificateExtensions.set(san.getExtensionId().toString(), san);
            info.set(X509CertInfo.EXTENSIONS, certificateExtensions);
        }       
        catch(Exception e) {
            fault(e, "dnsAlternativeName(%s)", dns);
        }
View Full Code Here

Examples of sun.security.x509.SubjectAlternativeNameExtension

                String t = item.substring(0, colonpos);
                String v = item.substring(colonpos+1);
                gnames.add(createGeneralName(t, v));
            }
            // Non critical
            ext.set(SubjectAlternativeNameExtension.NAME, new SubjectAlternativeNameExtension(false, gnames));
        }

        info.set(X509CertInfo.EXTENSIONS, ext);

        // Sign the cert to identify the algorithm that's used.
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.