SSL/TLS 在 Cloudflare 上订阅 Office 365 推送通知时出现问题

SSL/TLS issue with subscribing to Office 365 push notifications on Cloudflare

我目前正在尝试通过 Office 365 API,特别是 Outlook 订阅推送通知。

https://msdn.microsoft.com/en-us/office/office365/api/notify-rest-operations

但是,每当我尝试执行订阅操作时,都会return出现以下错误:

Notification URL \'https://interseller.io/valid/path?validationtoken=YTc5NDI1OTEtNDY1Yy00ODczLWExYjYtZmU0OGI3N2JjNjI0\' verification failed \'System.Net.WebException: The request was aborted: Could not create SSL/TLS secure channel.\r\n at System.Net.HttpWebRequest.GetResponse()\r\n at Microsoft.Exchange.OData.Model.Notifications.PushNotification.PushSubscriptionCallbackUrlValidationHelper.SendRequestAndVerifyResponse(Uri callbackUrl, PushSubscription pushSubscription)\'.

我通过 CloudFlare 和 SSL 运行 做了,想知道是否有人知道:

在阅读 CloudFlare 如何处理 SSL 证书几个小时后,发现此错误是由于 SNI 与您域的 SNI 不匹配造成的。

例如CloudFlare 的免费 SSL SNI 类似于 sni12345.cloudflare.net,因为它不等于 interseller.io,Office 365 API 将导致它失败。

订阅 Cloudflare 的专用 SSL 证书解决了这个问题,他们分配了一个全新的证书,将 SNI 指向您的域。