Giter Club home page Giter Club logo

4d-plugin-xmlsec's Introduction

version platform license downloads

4d-plugin-xmlsec

XML signature based on xmlsec.

Library Package Managers

as of 2024-04-16, Monterey/Ventura bottle is 1.3.4, vcpkg is 1.3.3.

1.3.x breaks compatibility. set flag.

pDsigCtx->keyInfoReadCtx.flags  |= XMLSEC_KEYINFO_FLAGS_LAX_KEY_SEARCH;
pDsigCtx->keyInfoWriteCtx.flags |= XMLSEC_KEYINFO_FLAGS_LAX_KEY_SEARCH;

OpenSSL3 may not work with legacy PKCS#12

https://www.openssl.org/docs/man3.0/man1/openssl-pkcs12.html

PKCS12_parse:error=4:crypto library function failed:openssl error: error:0308010C:digital envelope routines::unsupported

miyako.github.io

OpenSSL tips

the plugin accepts P12 or PEM/DER, but you can convert keys and certificates from one format to another.

XAdES tools

XML:DSIG tools

4d-plugin-xmlsec's People

Contributors

miyako avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

mesopelagique

4d-plugin-xmlsec's Issues

Bolivia

Hello,
I have checked "XMLDsig" plugin.
I need to sign the Bolivian invoice with these steps, do I understand that the canonization process is inside "xmldsig"?

  1. Apply the canonicalization algorithm to the XML document, that is, carry out a processing that allows obtaining its canonical form or normalizing the original document.

  2. Apply the sha256 algorithm to the result in order to obtain the HASH.

  3. Obtain a string by applying the Base64 algorithm to the previous HASH.

  4. Add the signature tags to the XML.

  5. Add to the Digest Value tag the value obtained in step 4.

  6. Take the signature section and obtain a HASH of it applying the SHA256 algorithm.

7.Encrypt the HASH obtained using the RSA SHA256 algorithm with the private key

  1. Apply the Base64 algorithm to the resulting string to obtain a string

  2. Add the above string to the Signature Value tag.

  3. Finally place the public key in the X509 Certificate label

  4. Return the signed XML

Thanks for your time

Error signing v19R6

Hello Miyako.

Mac OS 12.6.1
4D 19R6.282985

At time of execute xmlsec sign

We get the error failed:xmlSecDSigCtxSign

In all your examples

In v18 it works fine.

ETSI TS 103 171 v2.1.1 Baseline Profile error

Children order and number DO NOT MATCH specification

  • SignedSignatureProperties/SignaturePolicyIdentifier/SignaturePolicyId/SigPolicyId/DocumentationReferences-{CheckSchemaForChildren}

  • SignedDataObjectProperties-{CheckIfDOFsPointToAllReferencesToSignedObjects}

Errors detected when checking that any xades:DataObjectFormat property incorporated to the signature points to one ds:Reference referencing a signed data object AND that each ds:Reference element referencing a signed data object is pointed by one xades:DataObjectFormat property. Not each ds:Reference referencing a signed data object, is pointed by one xades:DataObjectFormat element. ds:Reference elements not pointed: ds:Signature/ds:SignedInfo/ds:Reference[2] (first in sequence is number 1). First in sequence is number 1. Please check that the ds:Reference pointing to the xadesv132:SignedProperties element does have the Type attribute set to "http://uri.etsi.org/01903#SignedProperties"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.