programster/cert-manager 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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:

  1. Fill in the testing/TestSettings.php.tmpl and rename it to testing/TestSettings.php
  2. Run the tests with php testing/main.php

统计信息

  • 总下载量: 175
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 5
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-01-28