setasign / setapdf-signer-addon-globaltrust-trust2go Goto Github PK
View Code? Open in Web Editor NEWA signature add-on for the SetaPDF-Signer component for TRUST2GO by GLOBALTRUST
License: MIT License
A signature add-on for the SetaPDF-Signer component for TRUST2GO by GLOBALTRUST
License: MIT License
In the 2FA demo you may end up with unnamed options in the certificate drop-down, rendering them invisible. This is due to the fact, that the description
property of the returned certificates may be an empty string.
Unfortunately, this is not documented by TRUST2GO, but can be circumvented by naming the options with a combination of the certificateSerialNumber
property and, if present, the description
, like so.
let opt = '<option value="' + certificate.certificateSerialNumber + '">{{NAME}}</option>';
let name = certificate.certificateSerialNumber;
if (certificate.description) {
name += ' (' + certificate.description + ')';
}
certificatesHtml += opt.replace('{{NAME}}', name);
From our experience, it's the user level certificates (the relevant ones) that do not have a description, whereas root and sub level certificates have one.
While fiddling with the 2FA demo, we ran into the following exception.
Fatal error: Uncaught SetaPDF_Core_Type_IndirectReference_Exception: Object could not be resolved (15, 0) in <REDACTED>/vendor/setasign/setapdf-signer_eval_ioncube_php7.1/library/SetaPDF/Core/Type/IndirectReference.php:172 Stack trace:
#0 <REDACTED>/vendor/setasign/setapdf-signer_eval_ioncube_php7.1/library/SetaPDF/Core/Document.php(1839): SetaPDF_Core_Type_IndirectReference->ensure()
#1 <REDACTED>/vendor/setasign/setapdf-signer_eval_ioncube_php7.1/library/SetaPDF/Core/Document.php(1506): SetaPDF_Core_Document->_updateFileIdentifier()
#2 <REDACTED>/vendor/setasign/setapdf-signer_eval_ioncube_php7.1/library/SetaPDF/Signer.php(774): SetaPDF_Core_Document->save()
#3 <REDACTED>/vendor/setasign/setapdf-signer_eval_ioncube_php7.1/library/SetaPDF/Signer.php(598): SetaPDF_Signer->_prepareTemporaryVersion()
#4 <REDACTED>/public/controll in <REDACTED>/vendor/setasign/setapdf-signer_eval_ioncube_php7.1/library/SetaPDF/Core/Type/IndirectReference.php on line 172
We figured, that it is provoked by the presign()
-method of the SetaPDF_Signer
and it seems to be happening in connection with writing a temporary file. For this reason, we've changed the sys_temp_dir
PHP option and set generous directory permissions. In any case, the file gets written and has the typical structure of a PDF file. Hence writing the file doesn't seem to be the problem. Since the stack trace mentions _updateFileIdentifier()
, we wonder if there is anything unusual happening after writing the file and how the environment needs to be configured for this to work properly.
Some specs:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.