@ Nullable public static byte [ ] convertCertificateStringToByteArray ( @ Nullable final String sCertificate ) { // Remove prefix/suffix final String sPlainCert = getWithoutPEMHeader ( sCertificate ) ; if ( StringHelper . hasNoText ( sPlainCert ) ) return null ; // The remaining string is supposed to be Base64 encoded -> decode return Base64 . safeDecode ( sPlainCert ) ; }
Convert the passed X . 509 certificate string to a byte array .