Skip to content

andredourado/digital-certificate-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

digital-certificate-test

Simple routine developed in PHP to test digital certificates.

Inform a digital certificate file and its password, then routine returns a json with digital certificate information.

JSON indicates success (1) or failure (0) of certificate reading. In case of success returns digital certificates information.

Example:

{
 	"returnCode":1,
	"isExpired":true,
 	"companyName":"AUDITS SOLUCOES LTDA:99999999999999",
 	"validFrom":{"date":"2017-10-25 17:26:58.000000","timezone_type":3,"timezone":"Europe\/Berlin"},
	"validTo":{"date":"2018-10-25 17:26:58.000000","timezone_type":3,"timezone":"Europe\/Berlin"},
	"cnpj":"99999999999999"
}
{
 	"returnCode":0
}

Requirements

That routine uses open source projects to run properly:

Installation

Create a directory to store routine.

$ mkdir certtest
$ cd certtest

Routine requires nfephp-org/sped-nfe to run.

$ composer require nfephp-org/sped-nfe

Copy certtest.php script to directory created before.

Execution

Run script informing digital certificate file with ".pfx" extension and its password.

$ php certtest.php audits.pfx 123456

License

MIT

About

Simple routine developed in PHP to test digital certificates.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages