code: private Object getX500Name(String name, boolean getIssuer)
          throws IOException {
          if (name.equalsIgnoreCase(X509CertInfo.DN_NAME)) {
              return getIssuer ? issuer : subject;
          } else if (name.equalsIgnoreCase("x500principal")) {
              return getIssuer ? issuer.asX500Principal()
                               : subject.asX500Principal();
          } else {
              throw new IOException("Attribute name not recognized.");
          }
      }
docs: /*
  Get the Issuer or Subject name