*
* @since 1.2
*/
public static Collection<X509Certificate> decodeCertificate(File certs) throws CertificateException{
if(!certs.exists()){
throw new CertificateException("Certificate file " + certs.getAbsolutePath() + " does not exist");
}
if(!certs.canRead()){
throw new CertificateException("Certificate file " + certs.getAbsolutePath() + " is not readable");
}
try{
return decodeCertificate(DatatypeHelper.fileToByteArray(certs));
}catch(IOException e){
throw new CertificateException("Error reading certificate file " + certs.getAbsolutePath(), e);
}
}