manyou/x509-chain-verifier
Composer 安装命令:
composer require manyou/x509-chain-verifier
包简介
X.509 Chain Verifier
README 文档
README
Verify x5c JWT header. Mainly for usage of Apple App Store Server API.
Installation
Ensure your composer.json allows dev packages.
{
"minimum-stability": "dev",
"prefer-stable": true
}
composer require manyou/x509-chain-verifier
Usage with lcobucci/jwt
use Manyou\X509ChainVerifier\SignedWithChain; use Manyou\X509ChainVerifier\X509ChainVerifier; use Lcobucci\JWT\Signer\Ecdsa; use Lcobucci\JWT\Token\Parser; use Lcobucci\JWT\Encoding\JoseEncoder; use Lcobucci\JWT\Validation\Validator; use Lcobucci\JWT\UnencryptedToken; $parser = new Parser(new JoseEncoder()); $validator = new Validator(); // $appleNotification['signedPayload'] // https://developer.apple.com/documentation/appstoreservernotifications/responsebodyv2 $jwt = '...'; /** @var UnencryptedToken $token */ $token = $parser->parse($jwt); $signedWithChain = new SignedWithChain( Ecdsa\Sha256::create(), new X509ChainVerifier(X509ChainVerifier::APPLE_WDR), ); $validator->assert($token, $signedWithChain); var_dump($token->claims()->all());
Get SHA-256 fingerprints for trusted certificates
For convenience, fingerprints of Apple Intermediate Certificates - Worldwide Developer Relations - G6-G1 are available in constant X509ChainVerifier::APPLE_WDR. These fingerprints are produced by:
php vendor/manyou/x509-chain-verifier/get_fingerprints.php \
https://www.apple.com/certificateauthority/AppleWWDRCAG6.cer \
https://www.apple.com/certificateauthority/AppleWWDRCAG5.cer \
https://www.apple.com/certificateauthority/AppleWWDRCAG4.cer \
https://www.apple.com/certificateauthority/AppleWWDRCAG3.cer \
https://www.apple.com/certificateauthority/AppleWWDRCAG2.cer \
https://developer.apple.com/certificationauthority/AppleWWDRCA.cer
Output
[
"bdd4ed6e74691f0c2bfd01be0296197af1379e0418e2d300efa9c3bef642ca30",
"53fd008278e5a595fe1e908ae9c5e5675f26243264a5a6438c023e3ce2870760",
"ea4757885538dd8cb59ff4556f676087d83c85e70902c122e42c0808b5bce14c",
"dcf21878c77f4198e4b4614f03d696d89c66c66008d4244e1b99161aac91601f",
"9ed4b3b88c6a339cf1387895bda9ca6ea31a6b5ce9edf7511845923b0c8ac94c",
"ce057691d730f89ca25e916f7335f4c8a15713dcd273a658c024023f8eb809c2"
]
manyou/x509-chain-verifier 适用场景与选型建议
manyou/x509-chain-verifier 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 6.32k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2022 年 12 月 16 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「apple」 「x509」 「openssl」 「jwt」 「x5c」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 manyou/x509-chain-verifier 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 manyou/x509-chain-verifier 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 manyou/x509-chain-verifier 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A PHP library to encrypt/decrypt secrets using OpenSSL.
A PHP Framework that allows you to encode and decode arbitrary ASN.1 structures using the ITU-T X.690 Encoding Rules.
A simple library to decode and parse Apple Sign In client tokens.
Platine Security provides a complete security system with encryption, hash support.
Apple Push Notification & Feedback Provider
PHP Secure Communications Library - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509 etc.
统计信息
- 总下载量: 6.32k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 28
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-12-16