-
Notifications
You must be signed in to change notification settings - Fork 303
Open
Labels
pkcs12Issues that are related to PKCS#12Issues that are related to PKCS#12
Milestone
Description
I think we now have all the components to tackle the problem of trusted CA certificates in PKCS#12 keystores that were not created with the default Java PKCS#12 provider.
The trusted certificate entries in these p12 files are invisible to the Java PKCS#12 provider because they are missing an attribute that is needed to identify them as trusted certificate entries.
With the low-level PKCS#12 parser that was added to KSE in release 5.6.0 we can identify these previously invisible certificates in p12 files.
With the work of @jonwltn regarding wrapping of existing providers and creating our own providers we can modify the behavior of the Java PKCS#12 provider and "inject" the missing certificates after loading the keystore.
The basic idea:
- Add a wrapper around the Java PKCS#12 provider that opens the p12 file with both the Java provider and a low-level p12 parser that returns all certificates found in the p12 structure (a slightly adapted version of the parser used for the p12 content viewer).
- If there are certificates found by the low-level parser that are not found by the Java provider then ask user if they want to modify the keystore to include those (finding the right wording for this dialog is important: not too much text, not too complicated explanations, maybe just something like "Make p12 file compatible with Java?").
- The missing certificates are added as trusted certificate entries by the wrapper via the normal KeyStore API in the background. The opened keystore is in state "modified" after this.
- When the keystore is saved to disk then the Java provider takes care of adding the marker attribute to the trusted entries. The p12 file is now generally compatible with Java software.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
pkcs12Issues that are related to PKCS#12Issues that are related to PKCS#12