question: public Certificate buildCertificate ( String certString ) throws InvalidCertificate { try { String base64Cert = formatCertificate ( certString ) ; InputStream inBytes = new ByteArrayInputStream ( base64Cert . getBytes ( ) ) ; CertificateFactory cf = CertificateFactory . getInstance ( "X.509" ) ; assert inBytes . available ( ) > 0 ; Certificate certificate = cf . generateCertificate ( inBytes ) ; inBytes . close ( ) ; return certificate ; } catch ( Exception e ) { log . debug ( "buildCertificate: error " + e + " converted to InvalidCertificate." ) ; throw FaultUtil . InvalidCertificate ( "Could not build certificate" ) ; } }
target:  buildCertificate Build a certificate from a Base64 formatted, PKCS#7 encoding of the certificate