@omka88: Provided that you put your root certificate in the userstore (let's say, in a certs directory, right alongside the documents directory), that should do it:
Code:
id="$(wpa_cli add_network | sed -n '2p')"
wpa_cli \
set_network $id ssid "UIC-Wireless" \
set_network $id key_mgmt IEEE8021X \
set_network $id eap TTLS \
set_network $id identity "netid-here" \
set_network $id anonymous_identity "anonymous" \
set_network $id password "password-here" \
set_network $id ca_cert "/mnt/us/certs/Thawte_Premium_Server_CA.pem" \
set_network $id phase2 "auth=PAP" \
enable_network $id \
quit