Class ExampleScenario19
java.lang.Object
co.ankatech.ankasecure.sdk.examples.ExampleScenario19
Scenario 19 — PKCS#7/CMS Structural Analysis (data-plane).
Demonstrates the keyless inspection side of the PKCS#7 migration surface: the SDK reports the structure of a legacy PKCS#7/CMS artifact (format, recipients, signers, encryption parameters, support status and the recommended JOSE migration path) WITHOUT any decryption key. Structural analysis never touches key material, so it is the safe first step when assessing a body of legacy CMS files for migration.
Why analysis needs no key
- Envelope metadata only: the CMS header exposes content type, recipient and signer descriptors, and the content-encryption algorithm in the clear.
- The recipient-key id is optional: supplying one would let the platform additionally validate decryptability, but the structure report stands on its own.
- Data-plane only: no keystore import, no key provisioning — those
are control-plane concerns handled outside the SDK (see
ExampleScenario20).
Steps:
- Load the packaged, non-sensitive EnvelopedData fixture (single recipient, zero signers)
- Compact analysis:
analyzePkcs7over the Base64 of the fixture (no key) - Streaming analysis:
analyzePkcs7Streamover the same fixture materialized to a file - Print the structured report and confirm the two modes agree on the detected structure
API Endpoints:
- POST /api/v3/migration/analyze-pkcs7 (compact analysis)
- POST /api/v3/migration/stream/analyze-pkcs7 (streaming analysis)
Prerequisite: a cli.properties for a data-plane actor of the
provisioned playground. No pre-provisioned key and no recipient-key id are required for
analysis — the conversion counterpart that needs a recipient key is
ExampleScenario20.
- Author:
- ANKATech Solutions Inc.
- See Also:
-
Method Summary
-
Method Details
-
main
Runs the PKCS#7/CMS structural-analysis scenario.- Parameters:
args- command-line arguments (ignored)
-