Changes to meet upstream requirements

- origlen renamed to orig_len, types to size_t and declared a top
- use CONF_T_TEE + conf.flags instead of a new field