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: 

** exited: {{badmatch,{error,{asn1,{function_clause,
             {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),

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 Rodríguez Rubinos


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


---- Get Urchin 6 On Demand web analytics. Because you can't wait to be found.

More information about the erlang-questions mailing list