self signed x509 certificate issue in MQTT mosquitto using c# -


i using mqtt library in c# , following url. http://www.embedded101.com/blogs/paolopatierno/entryid/366/mqtt-over-ssl-tls-with-the-m2mqtt-library-and-the-mosquitto-broker implementing url while connecting client localhost server following error occur:-

c:\program files\mosquitto>mosquitto -c mosquitto.conf -v 1438001198: mosquitto version 1.4 (build date 27/02/2015 21:01:03.50) starting 1438001198: config loaded mosquitto.conf. 1438001198: opening ipv4 listen socket on port 8883. enter pem pass phrase: 1438001224: new connection 10.112.154.82 on port 8883. 1438001224: openssl error: error:140890c7:ssl routines:ssl3_get_client_certifica te:peer did not return certificate 1438001224: socket error on client <unknown>, disconnecting. 

my code is:-

x509certificate certificate = new x509certificate(@"d:\poc\abhinav\cert\cert\m2mqtt_ca.crt", "india@123");   mqttclient client = new mqttclient("10.112.154.82", 8883, true, new x509certificate(certificate));       string clientid = new guid("b0ca37b1-8a90-4a59-9665-fd8504357165").tostring(); client.connect(clientid);   

the error:

c# error:-{"a call sspi failed, see inner exception."}   

can 1 suggests me how implement certificate in mqtt using mosquitto.

it seems mosquitto broker waiting client certificate client authentication. m2mqtt supports server authentication described in above article. reading mosquitto documentation here : http://mosquitto.org/man/mosquitto-conf-5.html seems "require_certificate" set true (require client certificate). need set false.

paolo.


Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -