public static boolean validCertificateString ( String certificateString ) { try { byte [ ] certBytes = parseDERFromPEM ( certificateString , CERT_START , CERT_END ) ; generateCertificateFromDER ( certBytes ) ; } catch ( Exception e ) { return false ; } return true ; }
Checks the given certificate String to ensure it is a PEM formatted certificate .