public static X509Certificate readCertificate ( final InputStreamSource resource ) { try ( val in = resource . getInputStream ( ) ) { return CertUtil . readCertificate ( in ) ; } catch ( final IOException e ) { throw new IllegalArgumentException ( "Error reading certificate " + resource , e ) ; } }
Read certificate .