Rewrite the extension code to use an ASN1_ITEM structure