Replies: 6 comments 5 replies
-
Hi Philip, We have an issue when adding the certificate. We have changed the behavior of the 'Phase4PeppolWebAppListener._initPeppolAS4' method to add the certificate if previous one is invalid (line 189). We load the .pem from a file using a property describing its path and then retrieve the data from the file as byte[] and then invoke 'CertificateHelper.convertByteArrayToCertficate(data);' to get the certificate and finally validate it by computing a new eCheckResult. Do we have to load the data as text and use ' CertificateHelper.convertStringToCertficate'? Hereunder the added code:
Here is the part off the logs: [WARN ] 2023-05-23 14:56:36.182 [main] PeppolCertificateChecker - Explicitly removing all 2 entries from the list of trusted Peppol AP CA certificates Thanks for your help. |
Beta Was this translation helpful? Give feedback.
-
I am on my phone only, so I might have missed some details, but it looks like you are only calling
After this call you are not trusting any certificate. You have to add at least the French PoC CA afterwards. See my line from above:
hth |
Beta Was this translation helpful? Give feedback.
-
Guten Morgen Philip, First, thanks for your support.
I tried without clearing the checker (no call on clearTrustedPeppolAPCACertificates), it's the same. Now the error is due to a revoked certificate but its seems that all are valid and on the Debian, ca-certificates and ca-certificates-java are installed. [DEBUG] 2023-05-24 01:14:22.733 [main] Config - Resolving variables in configuration value '/com/peppol/keysPOC/ca.cert.pem' [DEBUG] 2023-05-24 01:14:22.746 [main] KeyStoreHelper - Trying to load key store from path 'truststore/2018/prod-truststore.jks' using type JKS Key: Sun RSA public key, 2048 bits Certificate Extensions: 7 [2]: ObjectId: 2.5.29.35 Criticality=false [3]: ObjectId: 2.5.29.19 Criticality=false [4]: ObjectId: 2.5.29.37 Criticality=false [5]: ObjectId: 2.5.29.15 Criticality=true [6]: ObjectId: 2.16.840.1.113730.1.1 Criticality=false [7]: ObjectId: 2.5.29.14 Criticality=false ] ] against 3 valid CAs: Key: Sun RSA public key, 4096 bits Certificate Extensions: 6 [2]: ObjectId: 2.5.29.19 Criticality=true [3]: ObjectId: 2.5.29.31 Criticality=false [4]: ObjectId: 2.5.29.15 Criticality=true [5]: ObjectId: 2.5.29.17 Criticality=false [6]: ObjectId: 2.5.29.14 Criticality=false ] ], [ Key: Sun RSA public key, 4096 bits Certificate Extensions: 6 [2]: ObjectId: 2.5.29.19 Criticality=true [3]: ObjectId: 2.5.29.31 Criticality=false [4]: ObjectId: 2.5.29.15 Criticality=true [5]: ObjectId: 2.5.29.17 Criticality=false [6]: ObjectId: 2.5.29.14 Criticality=false ] ], [ Key: Sun RSA public key, 4096 bits Certificate Extensions: 4 [2]: ObjectId: 2.5.29.19 Criticality=true [3]: ObjectId: 2.5.29.15 Criticality=true [4]: ObjectId: 2.5.29.14 Criticality=false ] ]] |
Beta Was this translation helpful? Give feedback.
-
Nein :(, |
Beta Was this translation helpful? Give feedback.
-
In brief, we have already added some code to load both certificates according to the associated settings in the configuration. |
Beta Was this translation helpful? Give feedback.
-
Hi, is adding the Peppol France POC CA cert to certificate checker essential? |
Beta Was this translation helpful? Give feedback.
-
Hi all,
this thread should contain the collective wisdom of what is needed to use phase4 for the Peppol French PoC.
I am assuming, that you are using the latest version of phase4 (2.1.0 at the time of writing).
Summary
Here is a summary of the issues that have been identified and that you need to deal with:
a) The French PoC uses a different AP certificate that is not in the default trust stores
b) The French PoC does not support OCSP and CRL - that should not be an issue, because OCSP/CRL is only used, if a certificate indicates so.
c) The Document Type Identifier used by the French PoC breaks the default parsing rules because it contains a double "::"
a) AP certificates
This is the intermediate French PoC CA as PEM:
Subject:
CN=Peppol FRPOC AP TEST CA,O=OpenPeppol AISBL,OU=FOR TEST ONLY,C=BE
The respective root certificate in PEM encoding is this:
Subject:
C=BE,OU=FOR TEST ONLY,O=OpenPeppol AISBL,CN=Peppol POC Root TEST CA
To add the new certificate as trusted to phase4 you need to do this:
Note: instead of having it in the code, you can of course load it from a file.
Note: this requires the peppol-commons library 9.0.4
c) Issue with Document Type Identifier parsing
The French PoC uses this Document Type Identifier:
The Syntax Specific ID is
urn:oasis:names:specification:ubl:schema:xsd:AttachedDocument-2::AttachedDocument
The Customization ID is
urn:AIFE.fr::2023#urn:fdc:peppol.eu:2017:poac:UBL:1.0
The Syntax version is
2.1
Due to the
::
in the customization ID, identifier parsing fails in classPeppolDocumentTypeIdentifierParts
because it assumes to split after the first::
. A bug fix release of peppol-commons was released. Each version >= 9.0.5 fixes this issue and parses this identifier correctly.To use this bugfix together with phase4 2.1.0, just enforce the version
9.0.5
in peppol-commons.hth, Philip
Beta Was this translation helpful? Give feedback.
All reactions