programster/cert-manager
最新稳定版本:1.1.0
Composer 安装命令:
composer require programster/cert-manager
包简介
An SDK for interfacing with Programster's TLS certificate manager
README 文档
README
A package to facilitate interfacing with Programster's TLS certificate manager.
Example Usage
The example below uses Guzzle for the HTTP message library and factory, because it is the most commonly used, but you are welcome to use anything that is PSR-7 and PSR-17 compliant.
// Create the client for interfacing with the API: $messagingClient = new \GuzzleHttp\Client(); $requestFactory = new \GuzzleHttp\Psr7\HttpFactory(); $client = CertManagerClient( $messagingClient, $requestFactory, $myAuthTokenId, $myAuthTokenSecret, "https://certs.mydomain.com" ); // Use the client to upload a set of certificates you created: $response = $client->createCertificateBundle( id: "9e138e97-1df3-4f44-9aeb-f54636dae710", name: "certificate for my.domain.com", cert: "....", chain: "...", fullchain: "....", privateKey: "....", ); // ... and to retrieve the certificate and write it out somewhere: $certificateBundle = $client->getCertificateBundle( id: "9e138e97-1df3-4f44-9aeb-f54636dae710", ); file_put_contents('/path/to/fullchain.pem', $certificateBundle->fullchain); file_put_contents('/path/to/private.pem', $certificateBundle->privateKey);
Testing
To run the tests:
- Fill in the
testing/TestSettings.php.tmpland rename it totesting/TestSettings.php - Run the tests with
php testing/main.php
统计信息
- 总下载量: 175
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-01-28