get.pme.sh/pnats@v0.0.0-20240304004023-26bb5a137ed0/test/configs/certs/tlsauth/certstore/pkcs12.md (about) 1 # PKCS12 Files 2 3 Refresh PKCS12 files when test certificates and keys (PEM files) are refreshed (e.g. expiry workflow) 4 5 - `client.p12` is a p12/pfx packaging of `client.pem` and `client-key.pem` 6 7 `openssl pkcs12 -export -inkey ./client-key.pem -in ./client.pem -out client.p12` 8 9 > Note: set the PKCS12 bundle password to `s3cr3t` as required by provisioning scripts 10 11 ## Cert Store Provisioning Scripts 12 13 Windows cert store supports p12/pfx bundle for certificate-with-key import. Windows cert store tests will execute 14 a Powershell script to import relevant PKCS12 bundle into the Windows store before the test. Equivalent to: 15 16 `powershell.exe -command "& '..\test\configs\certs\tlsauth\certstore\import-<client,server>-p12.ps1'"` 17 18 The `delete-cert-from-store.ps1` script deletes imported certificates from the Windows store (if present) that can 19 cause side-effects and impact the validity of different use tests. 20 21 > Note: Tests are configured for "current user" store context. Execute tests with appropriate Windows permissions 22 > (e.g. as Admin) if adding tests with "local machine" store context specified.