Use MCStringGetCString(*t_certpath) here, the utf8 version is just for passing to the ssl function.