cloudozer / ling

Erlang on Xen
http://erlangonxen.org/
Other
799 stars 81 forks source link

ssl implementation is incomplete (Bugzilla #89) #98

Open krant opened 9 years ago

krant commented 9 years ago

status CONFIRMED severity major in component ling-libs for --- Reported in version 0.2.2 on platform All Assigned to: mk

On 2013-12-18 05:55:19 +0100, vlad kirillov wrote:

7> httpc:request( 7> post, 7> {BuildService ++ "/1/transform", [AuthHeader], "application/octet-stream", Binary}, 7> [{ssl, [{verify, verify_none}]}], 7> [{sync, true}, {body_format, binary}, {socket_opts, [{recbuf, 32768}]}]). TRACEEX: caught [<0.321.0>] error:{badmatch,undefined} stack [{erl_parse,yecctoken_end_location,1,[{file,"/home/abuild/rpmbuild/BUILD/otp_src_R16B01/bootstrap/lib/parsetools/include/yeccpre.hrl"},{line,128}]},{erl_parse,yeccpars1,7,[{file,"/home/abuild/rpmbuild/BUILD/otp_src_R16B01/bootstrap/lib/parsetools/include/yeccpre.hrl"},{line,113}]},{erl_parse,yeccpars0,5,[{file,"/home/abuild/rpmbuild/BUILD/otp_src_R16B01/bootstrap/lib/parsetools/include/yeccpre.hrl"},{line,56}]},{erl_parse,parse_exprs,1,[{file,"erl_parse.yrl"},{line,559}]},{shell,'-get_command/5-fun-0-',1,[{file,"shell.erl"},{line,281}]}] TRACEEX: [<0.321.0>] exit:{ok,[{call,1,{remote,1,{atom,1,httpc},{atom,1,request}},[{atom,2,post},{tuple,3,[{op,3,'++',{var,3,'BuildService'},{string,3,"/1/transform"}},{cons,3,{var,3,'AuthHeader'},{nil,3}},{string,3,"application/octet-stream"},{var,3,'Binary'}]},{cons,4,{tuple,4,[{atom,4,ssl},{cons,4,{tuple,4,[{atom,4,verify},{atom,4,verify_none}]},{nil,4}}]},{nil,4}},{cons,5,{tuple,5,[{atom,5,sync},{atom,5,true}]},{cons,5,{tuple,5,[{atom,5,body_format},{atom,5,binary}]},{cons,5,{tuple,5,[{atom,5,socket_opts},{cons,5,{tuple,5,[{atom,5,recbuf},{integer,5,32768}]},{nil,5}}]},{nil,5}}}}]}]} TRACEEX: caught [<0.323.0>] error:undef stack [{error_handler,crash,1,[{file,"preload/error_handler.erl"},{line,101}]},{asn1rt_nif,decode_ber_tlv,1,[{file,"asn1rt_nif.erl"},{line,81}]},{'OTP-PUB-KEY',decode,2,[{file,"OTP-PUB-KEY.erl"},{line,1019}]},{pubkey_cert_records,decode_cert,1,[{file,"pubkey_cert_records.erl"},{line,39}]},{public_key,pkix_decode_cert,2,[{file,"public_key.erl"},{line,221}]},{ssl_certificate,trusted_cert_and_path,3,[{file,"ssl_certificate.erl"},{line,58}]},{tls_handshake,certify,7,[{file,"tls_handshake.erl"},{line,245}]},{tls_connection,certify,2,[{file,"tls_connection.erl"},{line,526}]}] TRACEEX: caught [<0.323.0>] error:undef stack [{erlang,nif_error,[{nif_not_loaded,module,asn1rt_nif,line,105}],[]},{asn1rt_nif,decode_ber_tlv,1,[{file,"asn1rt_nif.erl"},{line,81}]},{'OTP-PUB-KEY',decode,2,[{file,"OTP-PUB-KEY.erl"},{line,1019}]},{pubkey_cert_records,decode_cert,1,[{file,"pubkey_cert_records.erl"},{line,39}]},{public_key,pkix_decode_cert,2,[{file,"public_key.erl"},{line,221}]},{ssl_certificate,trusted_cert_and_path,3,[{file,"ssl_certificate.erl"},{line,58}]},{tls_handshake,certify,7,[{file,"tls_handshake.erl"},{line,245}]},{tls_connection,certify,2,[{file,"tls_connection.erl"},{line,526}]}] TRACEEX: caught [<0.323.0>] error:{badmatch,{error,{asn1,{undef,[{erlang,nif_error,[{nif_not_loaded,module,asn1rt_nif,line,105}],[]},{asn1rt_nif,decode_ber_tlv,1,[{file,"asn1rt_nif.erl"},{line,81}]},{'OTP-PUB-KEY',decode,2,[{file,"OTP-PUB-KEY.erl"},{line,1019}]},{pubkey_cert_records,decode_cert,1,[{file,"pubkey_cert_records.erl"},{line,39}]},{public_key,pkix_decode_cert,2,[{file,"public_key.erl"},{line,221}]},{ssl_certificate,trusted_cert_and_path,3,[{file,"ssl_certificate.erl"},{line,58}]},{tls_handshake,certify,7,[{file,"tls_handshake.erl"},{line,245}]},{tls_connection,certify,2,[{file,"tls_connection.erl"},{line,526}]}]}}}} stack [{pubkey_cert_records,decode_cert,1,[{file,"pubkey_cert_records.erl"},{line,39}]},{public_key,pkix_decode_cert,2,[{file,"public_key.erl"},{line,221}]},{ssl_certificate,trusted_cert_and_path,3,[{file,"ssl_certificate.erl"},{line,58}]},{tls_handshake,certify,7,[{file,"tls_handshake.erl"},{line,245}]},{tls_connection,certify,2,[{file,"tls_connection.erl"},{line,526}]},{tls_connection,next_state,4,[{file,"tls_connection.erl"},{line,2537}]},{gen_fsm,handle_msg,7,[{file,"gen_fsm.erl"},{line,505}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,239}]}] TRACEEX: caught [<0.323.0>] error:{badmatch,{error,{asn1,{undef,[{erlang,nif_error,[{nif_not_loaded,module,asn1rt_nif,line,105}],[]},{asn1rt_nif,decode_ber_tlv,1,[{file,"asn1rt_nif.erl"},{line,81}]},{'OTP-PUB-KEY',decode,2,[{file,"OTP-PUB-KEY.erl"},{line,1019}]},{pubkey_cert_records,decode_cert,1,[{file,"pubkey_cert_records.erl"},{line,39}]},{public_key,pkix_decode_cert,2,[{file,"public_key.erl"},{line,221}]},{ssl_certificate,trusted_cert_and_path,3,[{file,"ssl_certificate.erl"},{line,58}]},{tls_handshake,certify,7,[{file,"tls_handshake.erl"},{line,245}]},{tls_connection,certify,2,[{file,"tls_connection.erl"},{line,526}]}]}}}} stack [{public_key,pkix_decode_cert,2,[{file,"public_key.erl"},{line,225}]},{ssl_certificate,trusted_cert_and_path,3,[{file,"ssl_certificate.erl"},{line,58}]},{tls_handshake,certify,7,[{file,"tls_handshake.erl"},{line,245}]},{tls_connection,certify,2,[{file,"tls_connection.erl"},{line,526}]},{tls_connection,next_state,4,[{file,"tls_connection.erl"},{line,2537}]},{gen_fsm,handle_msg,7,[{file,"gen_fsm.erl"},{line,505}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,239}]}] TRACEEX: caught [<0.323.0>] exit:{shutdown,own_alert} TRACEEX: [<0.323.0>] exit:{shutdown,own_alert} TRACEEX: caught [<0.322.0>] error:{badmatch,{error,{tls_alert,"certificate unknown"}}} stack [{tls_connection,start_fsm,8,[{file,"tls_connection.erl"},{line,1208}]},{tls_connection,connect,7,[{file,"tls_connection.erl"},{line,145}]},{http_transport,connect,4,[{file,"http_transport.erl"},{line,134}]},{httpc_handler,connect,4,[{file,"httpc_handler.erl"},{line,900}]},{httpc_handler,connect_and_send_first_request,3,[{file,"httpc_handler.erl"},{line,914}]},{httpc_handler,init,1,[{file,"httpc_handler.erl"},{line,241}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,239}]}]

=ERROR REPORT==== 18-Dec-2013::10:43:10 === SSL: certify: tls_handshake.erl:259:Fatal error: certificate unknown TRACEEX: caught [<0.322.0>] exit:normal TRACEEX: [<0.322.0>] exit:normal {error,{failed_connect,[{to_address,{"build.erlangonxen.org", 8080}}, {inet,[inet],{tls_alert,"certificate unknown"}}]}}