code: public Principal getSubjectDN() {
          if (info == null)
              return null;
          try {
              Principal subject = (Principal)info.get(X509CertInfo.SUBJECT + DOT +
                                                      X509CertInfo.DN_NAME);
              return subject;
          } catch (Exception e) {
              return null;
          }
      }
docs: Gets the subject distinguished name from the certificate.
  
  @return the subject name.