Botconnector not working for a self signed nodejs bot

醉酒当歌 提交于 2019-12-22 12:24:15

问题


I created a simple bot. Self signed the ssl cert. Apparently that does not work for bot connector . I get following error form the bot, after several seconds.

{
    "error": {
        "code": "BadCertificate",
        "message": "An error occurred while sending the request. The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. The remote certificate is invalid according to the validation procedure. ",
        "statusCode": 500
    }
}

Does that mean self signed certificates are out of question for the bot? Any work around this problem?


回答1:


In short, yes, self-signed certs are not supported.

If you use HTTPS, you must have a properly chained cert. The Bot Connector uses standard server certificate validation to make sure your site is what it claims to be. Put another way, if you point a browser to your bot and your browser thinks the cert is legit, the Bot Connector likely will, too. If your browser doesn't like it, the Bot Connector probably won't either.

This is true for bots implemented in all languages.



来源:https://stackoverflow.com/questions/36330509/botconnector-not-working-for-a-self-signed-nodejs-bot

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!