Add support to create ASN1_OBJECT as X.509 extension

Fixes: https://bugzilla.osafoundation.org/show_bug.cgi?id=12982