changed Type of getAllCertificates to X509Certificate