Package com.sun.jndi.ldap

Examples of com.sun.jndi.ldap.LdapName$Rdn


    return ldif.toString();
  }

  public Name asJndiName() {
    try {
      LdapName name = null;
      for (LdapDNComponent component : components) {
        String encoded = component.attributeName + "=" + escapeForJndi(component.value);
        if (name == null) {
          name = new LdapName(encoded);
        } else {
          name.add(0, encoded);
        }
      }
      return name;
    } catch (InvalidNameException e) {
      throw new IllegalStateException("Unexpected invalid name: " + this, e);
View Full Code Here


public class Case {

    public static void main(String[] args) throws Exception {

        LdapName name = new LdapName("cn=Kuwabatake Sanjuro");
        name.setValuesCaseSensitive(false);
        name.size();    // will throw exception if rdns is null
    }
View Full Code Here

   */
  public String getUserCertificateCN()
     throws CertificateEncodingException
  {
    X500Name x500name = new JcaX509CertificateHolder(userCertificate).getSubject();
    RDN cn = x500name.getRDNs(BCStyle.CN)[0];

    return IETFUtils.valueToString(cn.getFirst().getValue());
  }
View Full Code Here

   */
  public String getUserCertificateOrg()
     throws CertificateEncodingException
  {
    X500Name x500name = new JcaX509CertificateHolder(userCertificate).getSubject();
    RDN org = x500name.getRDNs(BCStyle.O)[0];

    return IETFUtils.valueToString(org.getFirst().getValue());
  }
View Full Code Here

    return digestType;
  }

  protected String getValue(final X509Principal principal) {
    X500Name x500Name = new X500Name(principal.getName());
    RDN rdn = x500Name.getRDNs(BCStyle.CN)[0];
    return IETFUtils.valueToString(rdn.getFirst().getValue());
  }
View Full Code Here

    return IETFUtils.valueToString(rdn.getFirst().getValue());
  }

  protected String getValue(final X500Principal principal) {
    X500Name x500Name = new X500Name(principal.getName());
    RDN rdn = x500Name.getRDNs(BCStyle.CN)[0];
    return IETFUtils.valueToString(rdn.getFirst().getValue());
  }
View Full Code Here

      KeyStore userKeyStore = UserConfig.getUserKeyStore();
      X509Certificate currentCertificate = (X509Certificate) userKeyStore.getCertificate(CipherParams.CERTIFICATE_IDENTIFIER);
     
      if (currentCertificate != null) {
        X500Name currentCertificateSubject = new JcaX509CertificateHolder(currentCertificate).getSubject();
        RDN currentCertificateSubjectCN = currentCertificateSubject.getRDNs(BCStyle.CN)[0];

        String currentCertificateSubjectCnStr = IETFUtils.valueToString(currentCertificateSubjectCN.getFirst().getValue());
       
        if (!certificateCommonName.equals(currentCertificateSubjectCnStr)) {
          logger.log(Level.INFO, "- Certificate regeneration necessary: Cert common name in daemon config changed from " + currentCertificateSubjectCnStr + " to " + certificateCommonName + ".");
          return true;
        }       
View Full Code Here

TOP

Related Classes of com.sun.jndi.ldap.LdapName$Rdn

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.