Package com.intel.mtwilson.x500

Examples of com.intel.mtwilson.x500.DN


            String[] sslCertAliases = keystore.listTrustedSslCertificates();
            for(String alias : sslCertAliases) {
                try {
                    X509Certificate x509 = keystore.getX509Certificate(alias);
                    System.out.println("x509 subject: "+x509.getSubjectX500Principal().getName());
                    DN dn = new DN(x509.getSubjectX500Principal().getName());   
                    if( dn.getCommonName() != null && dn.getCommonName().equals(dnsHostnameOrIpAddress.toString()) ) {
                        return x509;
                    }
                    Set<String> alternativeNames = X509Util.alternativeNames(x509);
                    for(String alternativeName : alternativeNames) {
                        System.out.println("x509 alternative name: "+alternativeName);
View Full Code Here


//    @Override
    public X509Certificate getCertificateForAddress(InternetAddress dnsHostnameOrIpAddress) {
        System.out.println("ArrayCertificateRepository: getCertificateForAddress("+dnsHostnameOrIpAddress.toString()+")");
        for(X509Certificate x509 : keystore) {
            System.out.println("- x509 subject: "+x509.getSubjectX500Principal().getName());
            DN dn = new DN(x509.getSubjectX500Principal().getName());   
            if( dn.getCommonName() != null && dn.getCommonName().equals(dnsHostnameOrIpAddress.toString()) ) {
                System.out.println("- found subject");
                return x509;
            }
            Set<String> alternativeNames = X509Util.alternativeNames(x509);
            for(String alternativeName : alternativeNames) {
View Full Code Here

TOP

Related Classes of com.intel.mtwilson.x500.DN

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.