Please test snapshots of the coming R9C

Mikael Karlsson mikael.karlsson@REDACTED
Sun Jul 13 20:34:30 CEST 2003


It seems that the ssl:peercert function crashes if there is an
"unexpected" object identifier. I am trying to read a cert from
the Swedish Postens eID (Smartcard) . It does not crash if
I use the options [pkix, subject] instead of [ssl, subject] in the
example below.

/Mikael

ERROR erlang  code  crashed:
 File: /home/mikael/public_html/getpeercert.yaws:8
Reason: {function_clause,[{ssl_pkix_oid,id2atom,[{1,2,752,34,2,1}]},
                          {ssl_pkix,transform,1},
                          {lists,map,2},
                          {ssl_pkix,transform,1},
                          {ssl_pkix,decode_cert,2},
                          {m3,out,1},
                          {yaws_server,yaws_call,8},
                          {yaws_server,deliver_dyn_file,10}|
                          more]}
Req: {http_request,'GET',{abs_path,"/getpeercert.yaws"},{1,1}}


yaws code:
..
out(A) ->
       case Res = ssl:peercert(A#arg.clisock,[ssl, subject]) of
       {ok,Sequence} ->
            {html,io_lib:format("Accept: peer cert:~n~p~n", [Sequence])};
	_ ->
	   {ehtml,{p,[],f("Error in peer cert sequence ~p", [Res])}}
       end.
...



More information about the erlang-questions mailing list