环境信息
- EMQX 版本:开源版5.0.4
- 操作系统及版本:centos7
- 其他
问题描述
配置的tls双向验证,连接不上
相同的证书,配置在nginx中,开启nginx的tls双向验证,请求能正常转发,说明证书没有问题
证书配置到emqx上,就连接不上
配置文件及日志
报错日志:
supervisor: ‘esockd_connection_sup - <0.2134.0>’, errorContext: connection_shutdown, reason: {ssl_error,{options,{keyfile,“etc/pki_certs/pki_test_server.key”,{error,{asn1,{{wrong_tag,{{expected,2},{got,16,{16,[{6,<<42,134,72,134,247,13,1,1,1>>},{5,<<>>}]}}}},[{‘OTP-PUB-KEY’,match_tags,2,[{file,“OTP-PUB-KEY.erl”},{line,23999}]},{‘OTP-PUB-KEY’,decode_integer,2,[{file,“OTP-PUB-KEY.erl”},{line,23516}]},{‘OTP-PUB-KEY’,dec_RSAPrivateKey,2,[{file,“OTP-PUB-KEY.erl”},{line,2865}]},{‘OTP-PUB-KEY’,decode,2,[{file,“OTP-PUB-KEY.erl”},{line,1232}]},{public_key,der_decode,2,[{file,“public_key.erl”},{line,356}]},{ssl_config,init_private_key,5,[{file,“ssl_config.erl”},{line,186}]},{ssl_config,init,2,[{file,“ssl_config.erl”},{line,55}]},{ssl_gen_statem,ssl_config,3,[{file,“ssl_gen_statem.erl”},{line,162}]},{tls_connection,init,1,[{file,“tls_connection.erl”},{line,145}]},{proc_lib,init_p_do_apply,3,[{file,“proc_lib.erl”},{line,226}]}]}}}}}}, offender: [{pid,<0.2612.0>},{name,connection},{mfargs,{emqx_connection,start_link,[#{enable_authn => true,limiter => #{connection => default},listener => {ssl,default},zone => default}]}}]