code: public static ASN1Set getLastNameEntry(X500Name name) {
          RDN[] rdns = name.getRDNs();
          int size = rdns.length;
          return (size > 0) ? (ASN1Set) rdns[size - 1].toASN1Primitive() : null;
      }
docs: Gets the last name component from the {@link X509Name X509Name} name.
  
  @return the last name component. Null if there is none.