Re: [asio-users] SSL mutual authentication
Brought to you by:
chris_kohlhoff
From: Sam M. <sam...@us...> - 2010-10-17 15:25:05
|
MRK <mi...@ka...> wrote on 10/02/2010 05:25:12 PM: > > Ralf M. wrote: > > > In the SSL example(*) what modification is neccessary > > > to have mutual authentication (ie. two-way authentication) > > > between the server and client? > > > > > > *: > > > > http://www.boost.org/doc/libs/1_43_0/doc/html/boost_asio/example/ssl/ > {client,server}.cpp > > > > Solved. > > Hi, > Please share your solution. > Thanks > MRK I'm not sure how Ralf accomplished it, but this is the technique I've used in the past http://www.boost.org/doc/libs/1_44_0/doc/html/boost_asio/reference/ssl__basic_context/verify_mode.html context.set_verify_mode( boost::asio::ssl::context::verify_peer || boost::asio::ssl::context::verify_fail_if_no_peer_cert ); Sam |