public static String X509CertToString ( String cert ) { String cert64CharPerLine = cert . replaceAll ( "(.{64})" , "$1\n" ) ; return BEGIN_CERT + "\n" + cert64CharPerLine + "\n" + END_CERT + "\n" ; }
Convert a certificate in base 64 binary format with BEGIN and END strings