Fatal error: Uncaught exception 'NFePHP\Common\Exception\CertificateException' with message 'Unable to read certificate, get follow error: (error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag)(error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error)' in F:\wamp\www\srv-metal\servicedesk-metal\vendor\nfephp-org\sped-common\src\Exception\CertificateException.php on line 17 ( ! ) NFePHP\Common\Exception\CertificateException: Unable to read certificate, get follow error: (error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag)(error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error) in F:\wamp\www\srv-metal\servicedesk-metal\vendor\nfephp-org\sped-common\src\Exception\CertificateException.php on line 17
include("../../vendor/autoload.php");
use NFePHP\NFe\Make;use NFePHP\NFe\Tools;use NFePHP\Common\Certificate;use NFePHP\NFe\Common\Standardize;use NFePHP\NFe\Complements;
$content = dirname(__DIR__) . DIRECTORY_SEPARATOR . 'uploads' . DIRECTORY_SEPARATOR . 'certificados' . DIRECTORY_SEPARATOR . 'certificado_valedoaco.pfx';
$senha = '123456';
$nfe = new Make();$nfe = Make::v310();
$certificate = Certificate::readPfx($content, $senha);$tools = new Tools($configJson, $certificate);$tools->model('55');