Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with autoload.php / Generic::fromNode() in UNIX and TSA.php #1

Closed
Guidin12 opened this issue Sep 23, 2021 · 1 comment
Closed

Comments

@Guidin12
Copy link

Hi @bseddon , I'm trying to use your library to generate XAdES signatures in Ubuntu 20.04 and I'm having some issues with autoload files in composer, Generic::fromNode() function.

I have fixed them replacing "" by "/", but maybe it could be better to use realpath() php function that detect OS system and use paths accordingly (I haven't tested).

Moreover, I couldn't get the timestamp added because of the curl option: CURLOPT_CAINFO which can't be null.

I leave the fixes attached in this issue.
fixes.zip

Thanks for everything :)

@bseddon
Copy link
Owner

bseddon commented Sep 23, 2021

Thank you very much for letting me know about these issues. I've applied your fixes (with one alteration) so they are available in the repository now and will be included in the next composer release.

You may have guessed I've working on Window. PHP on Windows is agnostic about the direction of a slash when handling files which is why the code works OK for me. With your fixes I don't think there is a need to use realpath.

The alteration I have made is to the TSA fix. Rather than have almost the same array appear in both sides of the condition, instead the array is wrapped in a call to array_filter() as the default behaviour of this function is to remove array element that has a null value.

Thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants