Use socket options to select security mechanism
Merge pull request #556 from hurtonm/master

Use socket options to select security mechanism