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

Signature Validation Failed using Java #259

Open
kumarakmuz opened this issue Jan 3, 2024 · 1 comment
Open

Signature Validation Failed using Java #259

kumarakmuz opened this issue Jan 3, 2024 · 1 comment

Comments

@kumarakmuz
Copy link

kumarakmuz commented Jan 3, 2024

??

@Mats
Copy link

Mats commented May 15, 2024

This might be due to the element missing the URI attribute.
You can try the following and see if that fixes your problem:

// Sign using SHA-256 
$objDSig->addReference( 
    $doc,  
    XMLSecurityDSig::SHA256,  
    ['http://www.w3.org/2000/09/xmldsig#enveloped-signature'],
    ['force_uri' => true] // <----- this causes $force_uri to be true, which in turn results in the attribute URI="" being added
);

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