get validity and subject of X509