middleware-manager/ui
hhftechnologies 8f2c5861dc
Some checks failed
Tests / Lint (push) Has been cancelled
Tests / Run Tests (push) Has been cancelled
Build and Push Docker Image / build-and-push (push) Has been cancelled
Tests / Build (push) Has been cancelled
Issues solved by gerthomas
An "incorrect password" error is received when importing the generated Client .p12 mTLS certificate on iOS.

My understanding is this is frequently caused by incompatible encryption methods between modern certificate generation tools (like OpenSSL 3.x and in this case SSLMate’s go-pkcs12 Modern) and iOS’s older security standards.

The relevant portion of code is below:

// Generate PKCS#12 (.p12) file
p12Data, err := pkcs12.Modern.Encode(clientKey, clientCert, []*x509.Certificate{caCert}, req.P12Password)
if err != nil {
	return nil, fmt.Errorf("failed to generate PKCS#12: %w", err)
}
If this is changed to:

// Generate PKCS#12 (.p12) file
p12Data, err := pkcs12.Legacy.Encode(clientKey, clientCert, []*x509.Certificate{caCert}, req.P12Password)
if err != nil {
	return nil, fmt.Errorf("failed to generate PKCS#12: %w", err)
}
The generated client certificates can be imported by iOS devices.

I have forked the repo and tested it (it works) but would not advocate this change. An option to select legacy (only when required) would be preferable. Unfortunately the changes to the database where certs and keys are stored and the UI to make Legacy selectable are beyond me.
44a80ab152

Co-Authored-By: gerthomas <34512947+gerthomas@users.noreply.github.com>
2026-03-01 14:29:53 +05:30
..
src add legacy_p12 option for PKCS#12 generation 2026-03-01 13:23:10 +05:30
components.json update-ui 2025-12-31 21:53:32 +05:30
index.html update-ui 2025-12-31 21:53:32 +05:30
package-lock.json mtls-update 2026-01-14 04:19:52 +05:30
package.json mtls-update 2026-01-14 04:19:52 +05:30
postcss.config.js update-ui 2025-12-31 21:53:32 +05:30
tailwind.config.ts update-ui 2025-12-31 21:53:32 +05:30
tsconfig.json refactoring 2026-01-11 15:24:17 +05:30
tsconfig.node.json refactoring 2026-01-11 15:24:17 +05:30
vite.config.ts refactoring 2026-01-11 15:24:17 +05:30