Added x509 examples - #33
Conversation
Companion to the trust-store and onboarding fixes on the waltid-identity feat/x509-util-library branch (PR #1901). - ConfigureTrustStoreExample.kt: add a demonstration that passing a trust store as the second argument to X509CertificateUtil.Default's validate calls fully replaces its configured trust store rather than merging with it - it's not necessary to build a whole new util via setTrust() just to scope trust for a single call. - SignCertificateExample.kt: clarify the same point with a comment at its own validateCertificateChain() call, which uses this pattern. - New IsoMdlOnboardingExample.kt: builds a profile-compliant IACA root and Document Signer certificate via the ISO profile helpers, then demonstrates why a caller-supplied root must be validated against IsoIaCaRootX509CertificateProfile before being trusted as a signing anchor - mirrors OnboardingService.onboardDocumentSigner(), showing a non-compliant self-signed "root" correctly rejected with specific profile violations (missing KeyUsage, missing IssuerAlternativeName, wrong pathLenConstraint) rather than silently accepted. Built and ran all three examples against a local waltid-x509 1.0.0-SNAPSHOT publish containing the fixes.
|
Pushed 840a56e - built and ran all three examples against a local Context: while reviewing that PR I found Also added |
The x509/ examples (SignCertificateExample, ConfigureTrustStoreExample, IsoMdlOnboardingExample) weren't referenced anywhere in the README - added them to the project structure tree, a new Available Examples table, run commands, and Key Features.
|
Pushed c1accc9 - the README didn't reference the x509 examples anywhere (project structure, available examples table, run commands, key features). Added them throughout, matching the existing sections' format. Also did a pass on waltid-x509's own README in the identity repo, which was significantly out of date. |
No description provided.