aboutsummaryrefslogtreecommitdiffstats
path: root/libasn1fix
diff options
context:
space:
mode:
authorLev Walkin <vlm@lionet.info>2004-09-06 08:06:37 +0000
committerLev Walkin <vlm@lionet.info>2004-09-06 08:06:37 +0000
commitcae1cfd07b08a1da478aaf5ea44e9bc636a4c9b0 (patch)
tree76fd22a1e549a8d39bf456c163beacdf055b4044 /libasn1fix
parent88b89365fab32160c859d91f5c757be80b25b011 (diff)
treat references to object identifier differently
Diffstat (limited to 'libasn1fix')
-rw-r--r--libasn1fix/asn1fix_derefv.c2
-rw-r--r--libasn1fix/asn1fix_value.c22
2 files changed, 20 insertions, 4 deletions
diff --git a/libasn1fix/asn1fix_derefv.c b/libasn1fix/asn1fix_derefv.c
index 7be9d6d2..a00eac9c 100644
--- a/libasn1fix/asn1fix_derefv.c
+++ b/libasn1fix/asn1fix_derefv.c
@@ -32,7 +32,7 @@ asn1f_fix_dereference_values(arg_t *arg) {
r_value = -1;
}
- if(expr->value->type != ATV_INTEGER) {
+ if(0 && expr->value->type != ATV_INTEGER) {
FATAL(
"INTEGER value %s at line %d: "
"Incompatible value specified: %s",
diff --git a/libasn1fix/asn1fix_value.c b/libasn1fix/asn1fix_value.c
index 33da3661..80223d60 100644
--- a/libasn1fix/asn1fix_value.c
+++ b/libasn1fix/asn1fix_value.c
@@ -22,7 +22,7 @@ asn1f_value_resolve(arg_t *arg, asn1p_expr_t *expr) {
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 @@ asn1f_value_resolve(arg_t *arg, asn1p_expr_t *expr) {
*/
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)