treat references to object identifier differently
diff --git a/libasn1fix/asn1fix_value.c b/libasn1fix/asn1fix_value.c
index 33da366..80223d6 100644
--- a/libasn1fix/asn1fix_value.c
+++ b/libasn1fix/asn1fix_value.c
@@ -22,7 +22,7 @@
type_expr = asn1f_find_terminal_type(arg, expr);
DEBUG("%s(): terminal type %p", __func__, type_expr);
if(type_expr == 0) {
- DEBUG("\tTerminal type for %s not found", expr->Identifier);
+ FATAL("Terminal type for is %s not found", expr->Identifier);
return -1;
}
@@ -64,10 +64,26 @@
*/
ret = asn1f_check_type_compatibility(arg, type_expr, val_type_expr);
if(ret == -1) {
- DEBUG("\tIncompatible type of %s at %d with %s at %d",
+ switch(type_expr->expr_type) {
+ case ASN_BASIC_INTEGER:
+ case ASN_BASIC_ENUMERATED:
+ FATAL("Incompatible type of %s at %d with %s at %d",
type_expr->Identifier, type_expr->_lineno,
val_type_expr->Identifier, val_type_expr->_lineno);
- return -1;
+ return -1;
+ case ASN_BASIC_OBJECT_IDENTIFIER:
+ /*
+ * Ignore this for now.
+ * We can't deal with OIDs inheritance properly yet.
+ */
+ return 0;
+ default:
+ break;
+ }
+ WARNING("\tIncompatible type of %s at %d with %s at %d",
+ type_expr->Identifier, type_expr->_lineno,
+ val_type_expr->Identifier, val_type_expr->_lineno);
+ return 1;
}
if(asn1f_look_value_in_type(arg, val_type_expr, expr) == -1)