SSL problem

Miguel Rodríguez Rubinos mrrubinos@REDACTED
Thu Oct 28 16:22:27 CEST 2004


Hi,

thanks for your help. At the moment I can't read the certificate 

Cert received: {rdnSequence,[[{'AttributeTypeAndValue',
                                  {2,5,4,6},
                                  <<19,2,69,83>>}],
                             [{'AttributeTypeAndValue',
                                  {2,5,4,10},
                                 
<<19,11,66,97,110,107,105,110,116,101,114,83,73>>}],
                             [{'AttributeTypeAndValue',
                                  {2,5,4,11},
                                  <<19,3,87,101,98>>}],
                             [{'AttributeTypeAndValue',
                                  {2,5,4,3},                                 
<<19,19,119,115,46,105,110,116,46,98,97,110,107,105,110,116,101,114,46,101,115>>}]]}

But I received it. But now when I try to send data to the server (before 'pkix' I
couldn't),

ssl:send(CSock, HttpBalanceMessage),

it replies to me with:

--
HTTP/1.1 400 Bad Request
Server: iPlanet-Web-Proxy-Server/3.6-SP5

Your browser sent a message this server could not understand.
--

I don't know how to solve this, could you help me?


Thanks a lot,

     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
________________________________________________

On Thu Oct 28  7:47 , Mikael Karlsson <mikael.karlsson@REDACTED> sent:

>I have has some problems using ssl in CertOpts when
>some id is not known to the  decoder.
>Have you tried using 'pkix' instead of 'ssl' in CertOpts ?
>/Mikael
>
>torsdag 28 oktober 2004 12:09 skrev Miguel Rodríguez Rubinos:
>> 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  with exit value:
>> {{badmatch,{error,{asn1,{function_clause,[{'SSL-PKIX',getdec_SupportedExten
>>sions,[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,tran
>>sform,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
>


---- 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