[erlang-questions] Halp! We're getting this SSL / ASN1 error

Mark Allen <>
Wed Jan 23 20:45:24 CET 2013


We're using sendhub.com to send some SMS messages in one of our Erlang
modules, and we started getting this error from R14B04 around January 10
when they replaced their SSL certificate with a new one:

Erlang R14B04 (erts-5.8.5) [source] [64-bit] [rq:1] [async-threads:0]
[hipe] [kernel-poll:false]

Eshell V5.8.5  (abort with ^G)
1> ssl:start().
ok
2> inets:start().
ok
3> httpc:request(post,
{"https://api.sendhub.com/v1/messages/?username=FAKEFAKE&api_key=FAKEFAKE",
 [], "application/json", <<"{\"contacts\":[], \"groups\": [\"FAKE\"],
\"text\": \"this is a test\"}">>}, [], []).


Ginormous SSL data structure removed...

** Reason for termination =
** {{badmatch,
        {error,
            {asn1,
                {'Type not compatible with table constraint',
                    {{component,'Type'},
                     {value,{5,<<>>}},
                   
{unique_name_and_value,id,{1,2,840,113549,1,1,11}}}}}}},
    [{public_key,pkix_decode_cert,2},
     {public_key,path_validation,2},
     {ssl_handshake,certify,7},
     {ssl_connection,certify,2},
     {ssl_connection,next_state,3},
     {gen_fsm,handle_msg,7},
     {proc_lib,init_p_do_apply,3}]}
{error,
    {eoptions,
        {{{badmatch,
              {error,
                  {asn1,
                      {'Type not compatible with table constraint',
                          {{component,'Type'},
                           {value,{5,<<>>}},
                           {unique_name_and_value,id,
                               {1,2,840,113549,1,1,11}}}}}}},
          [{public_key,pkix_decode_cert,2},
           {public_key,path_validation,2},
           {ssl_handshake,certify,7},
           {ssl_connection,certify,2},
           {ssl_connection,next_state,3},
           {gen_fsm,handle_msg,7},
           {proc_lib,init_p_do_apply,3}]},
         {gen_fsm,sync_send_all_state_event,
             [<0.63.0>,start,infinity]}}}}

This problem only seems to happen on R14B04 - R15B+ works perfectly and so
does an equivalent curl command line option.

Does anyone know how to overcome this error?

Thanks.

Mark Allen
Sr. Software Developer
Alert Logic, Inc.

Security • Compliance • Cloud



More information about the erlang-questions mailing list