The security API's on iOS only seem to cover extracting certain parts of the certificate.
Has anyone used openSSL or asn1c to allow the retrieval of Extensions, Policies etc from the certificate bytes?
The security API's on iOS only seem to cover extracting certain parts of the certificate.
Has anyone used openSSL or asn1c to allow the retrieval of Extensions, Policies etc from the certificate bytes?
是的,您可以使用 openSSL 来解析证书,但这并不是一件容易的事,因为缺少 openSSL iOS 文档。
首先,您需要适用于 iOS 的 openSSL 库,并使用 openSSL 生成 x509 证书。然后使用openSSL中的方法尝试解析一下。
这是一个如何从证书扩展中提取 UPN 的示例(我自己回答)。它现在工作正常。其他元素与 fetch 类似。