joelwmale/php-ssl-certificate 问题修复 & 功能扩展

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

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

joelwmale/php-ssl-certificate

最新稳定版本:3.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.

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

/** @var string */
$certificate->issuer; // returns the issuer of the certificate

/** @var string */
$certificate->domain; // returns the primary domain on the certificate

/** @var array */
$certificate->additionalDomains; // returns all the additional/alt domains on the certificate

/** @var bool */
$certificate->isValid; // returns true if valid, false if not

/** @var Carbon */
$certificate->issued; // returns a carbon instance of when the certificate was issued

/** @var Carbon */
$certificate->expires; // returns a carbon instance of when the certificate expires

/** @var int */
$certificate->expiresIn; // returns the amount of days until the certificate expires

/** @var bool */
$certificate->expired; // returns true if the certificate is expired, false if not

/** @var string */
$certificate->signatureAlgorithm; // returns the signature algorithm used to sign the certificate

/** @var bool */
$certificate->isSelfSigned; // returns 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/convers 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.18k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 6
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

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

其他信息

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