Package iaik.asn1.structures

Examples of iaik.asn1.structures.Name


  /*
   * Get the subject and issuer info XXX check info
   */

  Name subject = new Name();
  subject.addRDN(ObjectID.country, (String) h.get("country"));
  subject.addRDN(ObjectID.organization ,(String) h.get("org"));
  subject.addRDN(ObjectID.organizationalUnit, (String) h.get("orgunit"));
  subject.addRDN(ObjectID.commonName ,(String) h.get("commonname"));
  subject.addRDN(ObjectID.emailAddress ,(String) h.get("email"));
  subject.addRDN(ObjectID.stateOrProvince,(String) h.get("state"));
  subject.addRDN(ObjectID.locality,(String) h.get("locality"));

  X509Certificate cert = new X509Certificate();
  if (h.containsKey("serial")) {
      cert.setSerialNumber(new BigInteger((String) h.get("serial")));
  } else {
View Full Code Here


      System.exit(1);
  }

  /* get the cert info from the user via the command line */

  Name issuer = new Name();
  issuer.addRDN(ObjectID.country, getEntry("country","US"));
  issuer.addRDN(ObjectID.organization,
    getEntry("company","Sun Microsystems Laboratories"));
  issuer.addRDN(ObjectID.organizationalUnit,
    getEntry("division","Brazil Project"));
  issuer.addRDN(ObjectID.commonName,
    getEntry("server name","foo.bar.com"));
   
  /* create the cert */

  X509Certificate cert =  new X509Certificate();
View Full Code Here

TOP

Related Classes of iaik.asn1.structures.Name

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.