return the correct error code in asn1_read_value_type()