Skip to content

test: CLI fallback extracts PEM from PFX via -legacy flag#11

Merged
vitormattos merged 1 commit intomainfrom
test/legacy-pfx-cli-fallback
Mar 23, 2026
Merged

test: CLI fallback extracts PEM from PFX via -legacy flag#11
vitormattos merged 1 commit intomainfrom
test/legacy-pfx-cli-fallback

Conversation

@vitormattos
Copy link
Member

Summary

Adds a unit test for DpsSigner::extractLegacyPemMaterial() via reflection.

The test creates a modern PFX using openssl_pkcs12_export(), then calls extractLegacyPemMaterial() directly (via reflection) to verify the CLI fallback correctly extracts both the private key PEM and certificate PEM.

The openssl pkcs12 -legacy flag supports both legacy and modern PFX files, so the test exercises the full CLI fallback path end-to-end.

Coverage

  • DpsSigner::extractLegacyPemMaterial() — CLI-based legacy PFX extraction via openssl pkcs12 -legacy

… flag

Signed-off-by: Vitor Mattos <vitor@php.rio>
@vitormattos vitormattos merged commit dda0661 into main Mar 23, 2026
10 checks passed
@vitormattos vitormattos deleted the test/legacy-pfx-cli-fallback branch March 23, 2026 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant