Hi @bseddon !!!
I hope your are fine!!
Thanks for this package again!
Today, I updated from v1.0.0 to v1.0.9 and I get the following error:
[2022-03-29 09:42:51] develop.ERROR: Call to undefined method lyquidity\xmldsig\SignedDocumentResourceInfo::generateDomDocument() {"userId":4,"exception":"[object] (Error(code: 0): Call to undefined method lyquidity\\xmldsig\\SignedDocumentResourceInfo::generateDomDocument() at /var/www/test/laravel/vendor/lyquidity/xml-signer/src/XAdES.php:310)
[stacktrace]
#0 /var/www/test/laravel/vendor/lyquidity/xml-signer/src/XAdES.php(253): lyquidity\\xmldsig\\XAdES::internalTimestamp(Object(lyquidity\\xmldsig\\SignedDocumentResourceInfo), 'addArchiveTimes...', 'http://M...', NULL)
#1 /var/www/test/laravel/app/M/Certifications/XMLUtils.php(110): lyquidity\\xmldsig\\XAdES::archiveTimestamp(Object(lyquidity\\xmldsig\\SignedDocumentResourceInfo), 'http://M...')
#2 /var/www/test/laravel/app/M/Certifications/CertificationService.php(69): App\\M\\Certifications\\XMLUtils->signAndTimpestampWithXADES('/var/www/test...', 'sin')
#3 /var/www/test/laravel/app/Http/Routes/web.php(78): M\\Certifications\\CertificationService->certificateEvidence(Object(Customer), 'sin', Array, 'Email')
Did you changed the way to sign with LTA on XAdES::archiveTimestamp() method??
My code is the following:
XAdES::signDocument(
new InputResourceInfo(
$path_xml, // The source document
ResourceInfo::file, // The source is a file
$partes_ruta['dirname'], // The location to save the signed document
$partes_ruta['filename'], // The name of the file to save the signed document in,
null,
false
),
new CertificateResourceInfo( $certData['cert'], ResourceInfo::string | ResourceInfo::pem ),
new KeyResourceInfo( $certData['pkey'], ResourceInfo::string ),
new SignatureProductionPlaceV2(
'City',
null, // This is V2 only
'City',
'28800',
'ES'
),
new SignerRoleV2(
'CEO'
),
array(
'canonicalizationMethod' => XMLSecurityDSig::C14N,
'addTimestamp' => $tsaURL // Include a timestamp? Can specify an alternative TSA url eg 'http://mytsa.com/'
)
);
XAdES::archiveTimestamp(
new SignedDocumentResourceInfo(
$path_xml,
ResourceInfo::file,
XAdES::SignatureRootId, // optional id
$partes_ruta['dirname'],
$partes_ruta['filename'].".xml",
XMLSecurityDSig::generateGUID('archive-timestamp-')
),
$tsaURL
);
Thanks Bill!
Hi @bseddon !!!
I hope your are fine!!
Thanks for this package again!
Today, I updated from v1.0.0 to v1.0.9 and I get the following error:
Did you changed the way to sign with LTA on XAdES::archiveTimestamp() method??
My code is the following:
Thanks Bill!