• Places
    • Home
    • Graphs
    • Prefixes
  • Admin
    • Users
    • Settings
    • Plugins
    • Statistics
  • CPACK
    • Home
    • List packs
    • Submit pack
  • Repository
    • Load local file
    • Load from HTTP
    • Load from library
    • Remove triples
    • Clear repository
  • Query
    • YASGUI SPARQL Editor
    • Simple Form
    • SWISH Prolog shell
  • Help
    • Documentation
    • Tutorial
    • Roadmap
    • HTTP Services
  • Login

4.3 library(xmldsig): XML Digital signature
All Application Manual Name SummaryHelp

  • Documentation
    • Reference manual
    • Packages
      • SWI-Prolog SSL Interface
        • XML cryptographic libraries
          • library(xmldsig): XML Digital signature
            • xmld_signed_DOM/3
            • xmld_verify_signature/4
Availability::- use_module(library(xmldsig)).(can be autoloaded)
Source[det]xmld_verify_signature(+DOM, +SignatureDOM, -Certificate, +Options)
Confirm that an ds:Signature element contains a valid signature. Certificate is bound to the certificate that appears in the element if the signature is valid. It is up to the caller to determine if the certificate is trusted or not. Raises an exception if the signature is not valid.

DOM is the complete document. Each ds:Reference must refer to exactly one element of DOM with an ID, Id or id attribute that has the referenced value. Options:

references(-Elements)
Unify Elements with the list of elements (in DOM) whose content is protected by the signature. It is the responsibility of the caller to verify that these are the elements it uses. Notably when verifying a SAML message, the content used must be (part of) one of these elements to avoid signature wrapping attacks.
weak_algorithms(+Boolean)
If true (default false), accept the SHA1 and MD5 based signature and digest algorithms.

Note: The DOM and SignatureDOM must have been obtained using the load_structure/3 option keep_prefix(true) otherwise it is impossible to generate an identical document for checking the signature. See also xml_write_canonical/3.

ClioPatria (version V3.1.1-51-ga0b30a5)