未找到Apple-app-site-association

Kio*_*oan 5 ios9 corespotlight ios-universal-links

我正在尝试通过Apple Search Validation Tool,我遇到了apple-app-site-association的问题.

由于某种原因,机器人无法找到我的文件.但是如果你打开它就在那里.

这不是格式化问题,因为甚至找不到文件.我有https所以不需要签署我的文件.

如文档中所述,我的文件没有任何扩展名.

有人遇到了类似的问题,并向Apple Developer foruns询问,但这对我没有帮助.

我的网址是https://ps3looke.ottvs.com.br/apple-app-site-association

我试着用cUrl检查它,一切看起来都很正常:

Caios-MacBook-Air:~ caiocoan$ curl -I https://ps3looke.ottvs.com.br/apple-app-site-association
HTTP/1.1 200 OK
Content-Length: 135
Content-Type: application/json
Last-Modified: Tue, 27 Oct 2015 15:36:52 GMT
Accept-Ranges: bytes
ETag: "f81e714dcd10d11:0"
Server: Microsoft-IIS/8.5
X-Powered-By: ASP.NET
Date: Wed, 04 Nov 2015 20:43:25 GMT
Run Code Online (Sandbox Code Playgroud)

我可能做错了什么,或者我需要做什么的任何想法?

Jeo*_*uan 3

我目前正在就同一问题联系 Microsoft 支持。我最初的看法是,Windows Server 2012 R2 在处理 TLS 1.2 时存在错误,TLS 1.2 是 AppleBot 用于抓取页面的 HTTPS 协议。

您的 apple-app-site-association 看起来非常好

编辑

我发现即使验证工具不起作用,当您在 iPad/iPhone 上的 Safari 上访问该网站时,也会弹出 Open in the xxx app

更新2015-12-22

微软已经回复我了。问题是 AppleBot 发送以下 Client Hello 来启动 SSL 连接

Signature Hash Algorithms (4 algorithms)
    Signature Hash Algorithm: 0x0401
        Signature Hash Algorithm Hash: SHA256 (4)
        Signature Hash Algorithm Signature: RSA (1)
    Signature Hash Algorithm: 0x0403
        Signature Hash Algorithm Hash: SHA256 (4)
        Signature Hash Algorithm Signature: ECDSA (3)
    Signature Hash Algorithm: 0x0201
        Signature Hash Algorithm Hash: SHA1 (2)
        Signature Hash Algorithm Signature: RSA (1)
    Signature Hash Algorithm: 0x0203
        Signature Hash Algorithm Hash: SHA1 (2)
        Signature Hash Algorithm Signature: ECDSA (3)
Run Code Online (Sandbox Code Playgroud)

当您查看 SSL 证书的证书层次结构时,您会看到

COMODO RSA Organization Validation Secure Server CA
    Certificate signature algorithm
        PKCS #1 SHA-384 With RSA Encryption
Run Code Online (Sandbox Code Playgroud)

当 Windows Server 收到来自 AppleBot 的 Client Hello 时,它会发现 AppleBot 支持 SHA1 和 SHA256,但是您的证书需要支持 SHA384。因此,根据https://www.rfc-editor.org/rfc/rfc5246#section-7.4.1.4.1,无法满足该请求,Windows Server 会重置连接。AppleBot 然后报告为未找到文件。

具体来说,RFC5246 说

   If the client provided a "signature_algorithms" extension, then all
   certificates provided by the server MUST be signed by a
   hash/signature algorithm pair that appears in that extension.
Run Code Online (Sandbox Code Playgroud)

微软建议的补救措施

当您需要使用验证器时,创建自签名证书。默认情况下,Windows 使用 SHA1 作为证书签名算法。将自签名证书绑定到您的 HTTPS 端点,然后使用验证器确保您的 apple-app-site-association 文件正常。然后您可以切换回您购买的实际 SSL 证书。

我的警告

不要将自签名证书放在生产服务器上。创建另一个服务器来测试!