Problem: stream_engine.cpp security can be downgraded

Solution: accept only the mechanism defined by the socket options.

I've not tested this yet, so it's a speculative fix.
Merge pull request #1188 from hintjens/master

Problem: stream_engine.cpp security can be downgraded