selective-php / xmldsig

Sign XML Documents with Digital Signatures
MIT License
73 stars 34 forks source link

Namespace ds request #26

Closed bestzxcmos03 closed 9 months ago

bestzxcmos03 commented 11 months ago

Hello Odan, i'm working for XAdES how can i add the namespace to your xml signature (ie. )

odan commented 11 months ago

Hi @bestzxcmos03 Thanks for your request.

Currently, this package provides XMLDSIG functionality for creating and verifying XML digital signatures, but I recognize the importance of expanding its capabilities to support XAdES (XML Advanced Electronic Signatures) as well.

XAdES is a standard for advanced electronic signatures that offers features such as enhanced signature properties, long-term validity, legal compliance, and support for various profiles like XAdES-BES, XAdES-T, and XAdES-C. By adding XAdES support to this package, we aim to provide users with a more comprehensive solution for their signature needs, especially when dealing with complex regulatory or industry requirements.

Here are the needed changes for providing XAdES support:

  1. XAdES Namespace Support: We have to ensure that the package can handle XML elements and attributes from the XAdES namespace (http://uri.etsi.org/01903/v1.3.2#) used in XAdES signatures.

  2. Profile Selection: Users will be able to select and configure different XAdES profiles (e.g., XAdES-BES, XAdES-T, XAdES-C) when creating signatures.

  3. Additional Signature Properties: The package should allow users to specify and include XAdES-specific signature properties, such as SigningTime, SignerDetails, and SignedDataObjectProperties.

  4. Validation: Implementing a signature validation logic for XAdES signatures, including compliance checks with the selected XAdES profile.

  5. Timestamps: Support for adding and verifying timestamps should be included, as some XAdES profiles require them.

  6. Qualifying Properties: Users should customize and include XAdES qualifying properties (e.g., QualifyingProperties) in the signature.

  7. Policy Information: Options should be provided to specify and include policy information in the signature, as required by some XAdES profiles.

  8. Attribute Certificates: If necessary for the selected XAdES profile, the package should handle attribute certificates.

I understand the importance of XAdES. However, this will be a significant undertaking, and it may take some time to implement and thoroughly test these features.

If you or any other community members are interested in contributing to this effort, I welcome your input, collaboration, and assistance in making XAdES support for this package. Please feel free to provide feedback, ideas, or even code contributions to help start this process.