code: public Object get(String name)
      throws CertificateException, IOException {
          X509AttributeName attrName = new X509AttributeName(name);
  
          int attr = attributeMap(attrName.getPrefix());
          if (attr == 0) {
              throw new CertificateParsingException(
                            "Attribute name not recognized: " + name);
          }
          String suffix = attrName.getSuffix();
  
          switch (attr) { // frequently used attributes first
          case (ATTR_EXTENSIONS):
              if (suffix == null) {
                  return(extensions);
              } else {
                  if (extensions == null) {
                      return null;
                  } else {
                      return(extensions.get(suffix));
                  }
              }
          case (ATTR_SUBJECT):
              if (suffix == null) {
                  return(subject);
              } else {
                  return(getX500Name(suffix, false));
              }
          case (ATTR_ISSUER):
              if (suffix == null) {
                  return(issuer);
              } else {
                  return(getX500Name(suffix, true));
              }
          case (ATTR_KEY):
              if (suffix == null) {
                  return(pubKey);
              } else {
                  return(pubKey.get(suffix));
              }
          case (ATTR_ALGORITHM):
              if (suffix == null) {
                  return(algId);
              } else {
                  return(algId.get(suffix));
              }
          case (ATTR_VALIDITY):
              if (suffix == null) {
                  return(interval);
              } else {
                  return(interval.get(suffix));
              }
          case (ATTR_VERSION):
              if (suffix == null) {
                  return(version);
              } else {
                  return(version.get(suffix));
              }
          case (ATTR_SERIAL):
              if (suffix == null) {
                  return(serialNum);
              } else {
                  return(serialNum.get(suffix));
              }
          case (ATTR_ISSUER_ID):
              return(issuerUniqueId);
          case (ATTR_SUBJECT_ID):
              return(subjectUniqueId);
          }
          return null;
      }
docs: Get the certificate attribute.
  
  @params name the name of the Certificate attribute.
  
  @exception CertificateException on invalid attributes.
  @exception IOException on other errors.