Unwind ASN1_PRIMITIVE_FUNCS.

This was used to register custom primitive types, namely some INTEGER
variations. We have since removed them all.

Change-Id: Id3f5b15058bc3be1cef5e0f989d2e7e6db392712
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/43891
Reviewed-by: Adam Langley <agl@google.com>
diff --git a/crypto/asn1/tasn_new.c b/crypto/asn1/tasn_new.c
index 139a044..3e8beb7 100644
--- a/crypto/asn1/tasn_new.c
+++ b/crypto/asn1/tasn_new.c
@@ -308,11 +308,9 @@
     if (!it)
         return 0;
 
-    if (it->funcs) {
-        const ASN1_PRIMITIVE_FUNCS *pf = it->funcs;
-        if (pf->prim_new)
-            return pf->prim_new(pval, it);
-    }
+    /* Historically, |it->funcs| for primitive types contained an
+     * |ASN1_PRIMITIVE_FUNCS| table of calbacks. */
+    assert(it->funcs == NULL);
 
     if (it->itype == ASN1_ITYPE_MSTRING)
         utype = -1;
@@ -355,14 +353,9 @@
 static void asn1_primitive_clear(ASN1_VALUE **pval, const ASN1_ITEM *it)
 {
     int utype;
-    if (it && it->funcs) {
-        const ASN1_PRIMITIVE_FUNCS *pf = it->funcs;
-        if (pf->prim_clear)
-            pf->prim_clear(pval, it);
-        else
-            *pval = NULL;
-        return;
-    }
+    /* Historically, |it->funcs| for primitive types contained an
+     * |ASN1_PRIMITIVE_FUNCS| table of calbacks. */
+    assert(it == NULL || it->funcs == NULL);
     if (!it || (it->itype == ASN1_ITYPE_MSTRING))
         utype = -1;
     else