modified for using ssl api of controller