If a CA and its crypto token are imported from state dump, and an attempt is made to edit it, a misleading error message will be shown about missing crypto token (instead of complaining about missing private keys).
1. Create state dump with CA "TestCA" and crypto token "TestCAToken".
2. Import state dump into fresh installation with only "ManagementCA" CA/token.
3. Log-in as super-admin onto EJBCA.
4. Open page "CA Functions" -> "Certification Authorities".
5. Select "TestCA" from the list, and click on the "Edit CA" button.
1. A warning/error is shown to the user that CA cannot be saved/initialised until the missing private keys are created (possibly listing the private keys that are missing).
1. An error is shown about missing crypto token in crypto token select box:
"- Missing CryptoToken id
2. An explanation is shown below the crypto token select box, and at the bottom of the page next to the "Cancel" button:
"You need to select a cryptotoken that exists before you can save!"
The crypto token from the select box does exist, but it simply has no private keys at all.