{"action":"created","issue":{"url":"https://api.github.com/repos/eclipse/paho.mqtt.cpp/issues/19","repository_url":"https://api.github.com/repos/eclipse/paho.mqtt.cpp","labels_url":"https://api.github.com/repos/eclipse/paho.mqtt.cpp/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/eclipse/paho.mqtt.cpp/issues/19/comments","events_url":"https://api.github.com/repos/eclipse/paho.mqtt.cpp/issues/19/events","html_url":"https://github.com/eclipse/paho.mqtt.cpp/issues/19","id":174005222,"number":19,"title":"SSL support is not working","user":{"login":"phariprasadreddy","id":18527340,"avatar_url":"https://avatars.githubusercontent.com/u/18527340?v=3","gravatar_id":"","url":"https://api.github.com/users/phariprasadreddy","html_url":"https://github.com/phariprasadreddy","followers_url":"https://api.github.com/users/phariprasadreddy/followers","following_url":"https://api.github.com/users/phariprasadreddy/following{/other_user}","gists_url":"https://api.github.com/users/phariprasadreddy/gists{/gist_id}","starred_url":"https://api.github.com/users/phariprasadreddy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phariprasadreddy/subscriptions","organizations_url":"https://api.github.com/users/phariprasadreddy/orgs","repos_url":"https://api.github.com/users/phariprasadreddy/repos","events_url":"https://api.github.com/users/phariprasadreddy/events{/privacy}","received_events_url":"https://api.github.com/users/phariprasadreddy/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-08-30T12:24:33Z","updated_at":"2016-09-07T05:36:36Z","closed_at":"2016-08-30T23:42:30Z","body":"I have tried to SSL options to connect and it is not working.\r\nBasically I have .pem file and providing it in the truststore and trying to connect.\r\nHere is the code I have used to set SSL properties.\r\n\r\n```\r\nmqtt::ssl_options ssl;\r\nssl.set_trust_store(TRUST_STORE);\r\nssl.set_enable_server_cert_auth(0);\r\nconnectOptions.set_ssl(ssl);\r\n```\r\n Then it has coredumped.\r\nHere is the output I am seeing in the console:\r\n\r\n ```\r\nSetting SSL properties\r\nterminate called after throwing an instance of 'std::logic_error'\r\n  what():  basic_string::_S_construct null not valid\r\nAborted (core dumped)\r\n```\r\n\r\n\r\nI have commented out part of code in set_ssl in the connect_options.cpp as below\r\n\r\n```\r\nvoid connect_options::set_ssl(const ssl_options& ssl)\r\n{\r\n\tssl_.set_trust_store(ssl.get_trust_store());\r\n\t/*ssl_.set_key_store(ssl.get_key_store());\r\n\tssl_.set_private_key(ssl.get_private_key());\r\n\tssl_.set_private_key_password(ssl.get_private_key_password());\r\n\tssl_.set_enabled_cipher_suites(ssl.get_enabled_cipher_suites());*/\r\n\tssl_.set_enable_server_cert_auth(ssl.get_enable_server_cert_auth());\r\n\r\n\topts_.ssl = &ssl_.opts_;\r\n}\r\n```\r\n\r\nThen I am seeing MQTT exception as below:\r\n\r\n` Error: MQTT exception -1 `\r\n\r\nPlease let me know if you have any working sample.\r\n\r\nThanks,\r\nHari."},"comment":{"url":"https://api.github.com/repos/eclipse/paho.mqtt.cpp/issues/comments/245180140","html_url":"https://github.com/eclipse/paho.mqtt.cpp/issues/19#issuecomment-245180140","issue_url":"https://api.github.com/repos/eclipse/paho.mqtt.cpp/issues/19","id":245180140,"user":{"login":"phariprasadreddy","id":18527340,"avatar_url":"https://avatars.githubusercontent.com/u/18527340?v=3","gravatar_id":"","url":"https://api.github.com/users/phariprasadreddy","html_url":"https://github.com/phariprasadreddy","followers_url":"https://api.github.com/users/phariprasadreddy/followers","following_url":"https://api.github.com/users/phariprasadreddy/following{/other_user}","gists_url":"https://api.github.com/users/phariprasadreddy/gists{/gist_id}","starred_url":"https://api.github.com/users/phariprasadreddy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phariprasadreddy/subscriptions","organizations_url":"https://api.github.com/users/phariprasadreddy/orgs","repos_url":"https://api.github.com/users/phariprasadreddy/repos","events_url":"https://api.github.com/users/phariprasadreddy/events{/privacy}","received_events_url":"https://api.github.com/users/phariprasadreddy/received_events","type":"User","site_admin":false},"created_at":"2016-09-07T05:36:36Z","updated_at":"2016-09-07T05:36:36Z","body":"@guilhermeferreira Yes I have checked with Paho C it is working fine. Same pem file I am using for connecting with Paho C++.\r\n\r\nThanks,\r\nHari."}}
{"actor":{"display_login":"phariprasadreddy"}}