make ssl-optional work