fix --insecure flag
update tests for SSL verification