Renamed ca_value_type to ca_type

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>
Added the CA_INVALID type

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>