Fix SSL and add acceptance tests