<br><div class="gmail_quote">On Thu, May 5, 2011 at 10:06 PM, Steve Strong <span dir="ltr"><<a href="mailto:steve@srstrong.com">steve@srstrong.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div>
            <div>
                <span>Hi,<br>
                </span></div><div><span><br></span></div><div>
                <span>Does anyone out there have any experience with Webmachine (or mochiweb) and authentication using client certificates?  I've had a good google around but can't see anything that's pointing me in the right direction.  Getting regular SSL up & running was pretty straightforward, as is performing basic or digest authentication.<br>
<br></span></div><div><span>I've also quite easily used curl to exchange a client key, which appeared to be successful, but within my webmachine resource I can't see anyway to see that a client cert was presented, nor any details about it that would allow me to authenticate the user or not.</span></div>
<div><span><br></span></div><div><span>Any help would be much appreciated,</span></div><div><span><br></span></div><div><span>Cheers,</span></div><div><span><br></span></div><div><span>Steve</span></div><div><span><br></span></div>
<div><span>-- <br>Steve Strong, Director, id3as<br><div><a href="http://twitter.com/srstrong" target="_blank">twitter.com/srstrong</a></div><br></span></div></div></blockquote><div><br>There have been a few threads on the list about certificate verification. But in general, what you want to be investigating is the ssl modules verification support, the ssl options (in R14, for R13 it's new_ssl) to have a look at are:<br>
<br>{verify, verify_type()}<br>{fail_if_no_peer_cert, boolean()}<br>{verify_fun, fun(ErrorList) -> boolean()}<br>{depth, integer()}<br><br>I'll be investigating client certificate verification at some point this year. But not sure when yet.<br>
<br>Robby<br><br></div></div>