SSL problem

Miguel Rodríguez Rubinos mrrubinos@REDACTED
Thu Oct 28 12:09:28 CEST 2004


Hi all,

I'm new to Erlang and I'm trying to write a SSL client. 

I'm having next problem:

When I try to connect to a SSL server I get this error.

=ERROR REPORT==== 28-Oct-2004::10:48:22 ===
Error in process <0.32.0> with exit value: 
{{badmatch,{error,{asn1,{function_clause,[{'SSL-PKIX',getdec_SupportedExtensions,[id,{2,16,840,1,113730,1,1}]},{'SSL-PKIX',dec_Extension,2},{'SSL-PKIX',decode,2},{ssl_pkix,transform,1},{lists,map,2},{lists,map,2},{ssl_pkix,transform,1},...


** exited: {{badmatch,{error,{asn1,{function_clause,
                                       [{'SSL-PKIX',
                                            getdec_SupportedExtensions,
                                            [id,{2,16,840,1,113730,1,1}]},
                                        {'SSL-PKIX',dec_Extension,2},
                                        {'SSL-PKIX',decode,2},
                                        {ssl_pkix,transform,1},
                                        {lists,map,2},
                                        {lists,map,2},
                                        {ssl_pkix,transform,1},
                                        {ssl_pkix,transform,1},
                                        {ssl_pkix,decode_cert,2},
                                        {https,connect,4}]}}}},
            [{ssl_pkix,transform,1},
             {lists,map,2},     
             {lists,map,2},     
             {ssl_pkix,transform,1},
             {ssl_pkix,transform,1},
             {ssl_pkix,decode_cert,2},
             {https,connect,4}, 
             {epagado,retention_worker,4},
             {erl_eval,do_apply,5}]} **
                                
                                
Connection I'm trying is done with this function in my module https:
                                
connect(Host, Port, Opts, CertOpts) ->
    {ok, CSock} = ssl:connect(Host, Port, Opts),
    {ok, Cert} = ssl:peercert(CSock, CertOpts),
    .                           
    .                           
    CSock.                      
                                

and Opts parameter is       
                                
[{active, false},              
     {verify, 2},               
     {depth, 2},                
     {cacertfile, filename:join(["../priv/certs", "cacert1.pem"])},
     {cacertfile, filename:join(["../priv/certs", "cacert2.pem"])}]

and as CertOpts parameter I use

[ssl, subject]

The problem occurs when exactly here:
  {ok, Cert} = ssl:peercert(CSock, CertOpts),


I'm using a Debian Sarge and Erlang/OTP R10B.

Could anyone help me? I don't know how to solve this.

Thank you very much in advance.


Miguel



________________________________________________

Miguel Rodríguez Rubinos

NomaSystems

Edificio de Servicios Generales de Investigación
Campus de Elviña s/n
15071 A Coruña

Spain

http://www.nomasystems.com
_________________________________________________



---- Get Urchin 6 On Demand web analytics. Because you can't wait to be found.
http://www.urchin.com/?utm_campaign=U6OD&utm_medium=email&source=spymac.com&content=cantwait



More information about the erlang-questions mailing list