定制 joelwmale/php-ssl-certificate 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

joelwmale/php-ssl-certificate

最新稳定版本:4.0.0

Composer 安装命令:

composer require joelwmale/php-ssl-certificate

包简介

Easily retrieve the ssl certificate for any host

README 文档

README

Build Status Total Downloads Latest Stable Version License

This package makes it easy to download a certificate for a host.

Version Compatibility

PHP Version Package Version
8.3+ 4.x
8.0 - 8.2 3.x

Usage

use Joelwmale\SslCertificate\Certificate;

$certificate = Certificate::forHost('joelmale.com');

Installation

You can install the package via composer:

composer require joelwmale/php-ssl-certificate

Available Properties & Methods

All properties are readonly.

$certificate->issuer;              // string - the issuer of the certificate
$certificate->domain;              // string - the primary domain on the certificate
$certificate->additionalDomains;   // array  - all the additional/alt domains on the certificate
$certificate->valid;               // bool   - true if valid, false if not
$certificate->issued;              // Carbon - when the certificate was issued
$certificate->expires;             // Carbon - when the certificate expires
$certificate->expiresIn;           // int    - days until the certificate expires
$certificate->expired;             // bool   - true if the certificate is expired
$certificate->signatureAlgorithm;  // string - the signature algorithm used to sign the certificate
$certificate->isSelfSigned;        // bool   - true if the certificate was self signed

Get raw certificate as JSON

$certificate->getRawCertificateFieldsAsJson();

Determining if the certificate is valid at a given date

Returns true if the certificate will still be valid. Takes a Carbon instance as the first parameter.

$certificate->isValidAt(Carbon::today()->addMonth(1));

Determining if certificate contains/covers a domain

Returns true if the certificate contains the domain

$certificate->containsDomain('joelmale.dev');

Testing

$ composer test

Changelog

Please see CHANGELOG for a list of recent changes.

统计信息

  • 总下载量: 3.43k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 6
  • 点击次数: 4
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 6
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-07-30

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固