Name

asn1_to_xml — decode an ASN.1 DER blob into an XML representation

Synopsis

varchar asn1_to_xml( in bytes varchar,
  in length integer);
 

Description

Parses the DER-encoded ASN.1 structure in bytes and returns a human-readable XML rendering of it. Useful for inspecting X.509 certificates, PKCS#7 messages, OCSP responses and other ASN.1-encoded crypto payloads from inside SQL. The optional length argument overrides the number of bytes to parse (default: the full input box).

Returns SQL NULL if the input is not a valid ASN.1 DER encoding. Tag classes (UNIVERSAL, APPLICATION, CONTEXT, PRIVATE), primitive vs. constructed flags, OIDs and printable strings are all surfaced as XML elements and attributes in the result.


© 1992 - OpenLink Software. All rights reserved.

Making Technology Work for You®