2017 © Pedro Peláez
 

library comodo-decode-csr

image

xigen/comodo-decode-csr

  • Friday, April 28, 2017
  • by XigenChris
  • Repository
  • 2 Watchers
  • 2 Stars
  • 29 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 12 Versions
  • 4 % Grown

The README.md

ComodoDecodeCSR

Scrutinizer Code Quality Code Coverage Travis CI, (*1)

A simple PHP library to assist with passing a DVC (Domain Verification Check) check by Comodo. It uses a API Endpoint documented here to get the MD5 & SHA1 hashes. It can then check that these are installed on a domain by requesting http://yourdomain.com/(MD5Hash).txt., (*2)

For more infomation about Domain Control Validation read this, (*3)

Installation

Installation is done via composer: composer require xigen/comodo-decode-csr, (*4)

Requirements

Below is a list of requirements. There are unit tests to check compatibility with the diffrent PHP versions., (*5)

  • PHP 5.5+ (Tested 5.5, 5.6, 7 & HHVM)
  • Guzzle 6.X
  • The php-curl extension

Example Usage

This will use the test CSR within the repo and get the MD5 and SHA1 hashes. Then it will check that the text file is installed correctly., (*6)

require 'vendor/autoload.php';

$ComodoDecodeCSR = new ComodoDecodeCSR();

//Get the csr from a file as a string or could just use a string
$csr = file_get_contents('certificate/test.csr');
$ComodoDecodeCSR->setCSR($csr);

$Hashes = $ComodoDecodeCSR->fetchHashes();
$Check = $ComodoDecodeCSR->checkInstalled();
var_dump($Hashes, $Check);
/*
array(2) {
  'md5' =>
  string(32) "98EB197EF83F7A9EB736ED7CEBD413CE"
  'sha1' =>
  string(40) "DA9C72B6F6BCB05772BF8543E19D1A41B0210E84"
}
bool(true)
*/

Console Application

There is also a console application to quickly test a domain. To use it you will need to install this globaly via composer:, (*7)

composer global require xigen/comodo-decode-csr, (*8)

Now the command ComodoDecodeCSR should be avalible (if not check you path includes ~/.composer/vendor/bin/). You can now check if a domain will pass the DVC like so:, (*9)

➜ ComodoDecodeCSR check certificate.csr
Success!
This domain should pass DVC

Licence and Contribution

This source code is released under the GNU General Public License v3. Contributions are welcome in the form of pull requests. The code is written to PSR-2 standards. PHPUnit tests have been written and are located in the tests/ folder., (*10)

The Versions

28/04 2017

dev-master

9999999-dev

  Sources   Download

The Requires

 

The Development Requires

by Chris Hilsdon

28/04 2017

v0.4.2

0.4.2.0

  Sources   Download

The Requires

 

The Development Requires

by Chris Hilsdon

13/09 2016

dev-develop

dev-develop

  Sources   Download

The Requires

 

The Development Requires

by Chris Hilsdon

17/08 2016

dev-fix/fix-issue-2

dev-fix/fix-issue-2

  Sources   Download

The Requires

 

The Development Requires

by Chris Hilsdon

05/08 2016

v0.4.1

0.4.1.0

  Sources   Download

The Requires

 

The Development Requires

by Chris Hilsdon

05/08 2016

v0.4

0.4.0.0

  Sources   Download

The Requires

 

The Development Requires

by Chris Hilsdon

18/04 2016

v0.3.2

0.3.2.0

  Sources   Download

The Requires

 

The Development Requires

by Chris Hilsdon

18/04 2016

v0.3.1

0.3.1.0

  Sources   Download

The Requires

 

The Development Requires

by Chris Hilsdon

18/04 2016

v0.3

0.3.0.0

  Sources   Download

The Requires

 

The Development Requires

by Chris Hilsdon

05/04 2016

v0.2.1

0.2.1.0

  Sources   Download

The Requires

 

The Development Requires

by Chris Hilsdon

05/04 2016

v0.2

0.2.0.0

  Sources   Download

The Requires

 

The Development Requires

by Chris Hilsdon

01/04 2016

v0.1

0.1.0.0

  Sources   Download

The Requires

 

The Development Requires

by Chris Hilsdon