added option to pass-through rejectUnauthorized to avoid UNABLE_TO_VERIFY_LEAF_SIGNATURE errors if so desired