--- crypto/asn1/a_type.c.~1~	2015-01-15 09:43:14.000000000 -0500
+++ crypto/asn1/a_type.c	2015-01-17 15:12:17.000000000 -0500
@@ -117,7 +117,22 @@
 	{
 	int result = -1;
 
-	if (!a || !b || a->type != b->type) return -1;
+	if (!a || !b) {
+	  if (!a && !b) /* both types are empty (null) */
+	    return 0;
+	  /* one is null, the other is maybe ASN.1 NULL (explicit) */
+	  if (a && !b) { 
+	    if (a->type == V_ASN1_NULL)
+	      return 0;
+	  } 
+	  if (b && !a) {
+	    if (b->type == V_ASN1_NULL)
+	      return 0;
+	  }
+	  return -1; /* the non-null (present) type isn't ASN.1 NULL */
+	}
+
+	if (a->type != b->type) return -1;
 
 	switch (a->type)
 		{
