code: public X500Principal getSubjectX500Principal() {
          if (info == null) {
              return null;
          }
          try {
              X500Principal subject = (X500Principal)info.get(
                                              X509CertInfo.SUBJECT + DOT +
                                              "x500principal");
              return subject;
          } catch (Exception e) {
              return null;
          }
      }
docs: Get subject name as X500Principal. Overrides implementation in
  X509Certificate with a slightly more efficient version that is
  also aware of X509CertImpl mutability.