esig / dss-demonstrations

Examples of DSS integration
GNU Lesser General Public License v2.1
95 stars 70 forks source link

REST API certificate chain error #38

Closed samsam002 closed 1 year ago

samsam002 commented 1 year ago

Hi, I'm trying to use the REST API to sign a document using the signature value obtained from NexU the picture below shows the paylod i use;

image

i got a 500 Error, related to the parsing of the certificate chain

image

image

bsanchezb commented 1 year ago

Hello @samsam002,

You need to provide a certificate chain in the form of "encodedCertificate"s (the same should be done for a "signingCertificate"), i.e.:

    "certificateChain" : [ {
      "encodedCertificate" : "MIIFCDCCA/CgAwIBAgIDAYcPMA0GCSqGSIb3DQEBCwUAMIG..."
    }, {
      "encodedCertificate" : "MIIEejCCA2KgAwIBAgIDAYciMA0GCSqGSIb3DQEBCwUAMH8x..."
    } ],

Best regards, Aleksandr.

samsam002 commented 1 year ago

it works like a charm ! thank you very much