SSL is not honored.

Changed script to honor ssl option