parsing of x509 certificates and keys in javascript (via emscripten)