Hi.<br><br><div class="gmail_quote">On Tue, Oct 23, 2012 at 5:27 AM, Loïc Hoguin <span dir="ltr"><<a href="mailto:essen@ninenines.eu" target="_blank">essen@ninenines.eu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello,<br>
<br>
I am trying to set up client authentication on a website for testing, but my knowledge of SSL is quite poor.<br>
<br>
Can anyone give me clear steps to generate certificates and set things up, or at least pinpoint me to resources that would help me get started? Been trying for two days now and I'm kinda stuck.<br>
<br>
Thanks!</blockquote><div><br></div><div>Not quite sure what you are doing. To me certs would be on the server side then you would need client code that does ssl. I use inets like this to scrape an https web server:</div>
<div><br></div><div><div>inets:start(),</div><div>ssl:start(),</div><div>httpc:set_options([{cookies, enabled}]),</div><div>httpc:reset_cookies(),</div><div>URL="<a href="https://host.domain?username=username&passwd=password">https://host.domain?username=username&passwd=password</a>",</div>
<div>httpc:store_cookies([{"set-cookie","MYCOOKIE=acookie"}, {"set-cookie","AN_ID=;expires=Mon, 01-Jan-1990 08:00:00 GMT"} ], URL),</div><div>{ok,Results}=httpc:request(URL),</div><div>
{_,_Cookie}=Results,</div><div>httpc:store_cookies([Cookie], URL),</div><div>URL2="<a href="https://host.domain?var1=var1data&var2=var2data">https://host.domain?var1=var1data&var2=var2data</a>",</div><div>
{ok,Results2}=httpc:request(URL2),</div><div>......</div><div>inets:stop(),</div><div>ssl:stop().</div></div><div><br></div><div>hth,</div><div><br></div><div>wes</div></div>