Skip to main content

Import Certificates and Keys

A file with certificates and keys can be imported into the inventory in one step. The platform reads the file, lists what it holds, and imports the entries you select: certificates into the certificate inventory, and keys into a Token Profile. Keys can be imported only into a Token Profile whose token was created on a Cryptography Provider v2 connector that imports keys. The Software Cryptography Provider does, the PKCS#11 Cryptography Provider does not, and a token created on Cryptography Provider v1 imports none. See Import and export for how key material is protected.

Import a file​

  1. Click Certificates in the left menu
  2. Click Import certificates and keys (upload symbol )
  3. Choose the file, or paste its content. The platform recognizes the format from the content:
    • PKCS#12, in any composition
    • JKS and JCEKS key stores
    • a PEM bundle of certificates with at most one private key
    • a PKCS#8 private key, encrypted or not
    • an OpenSSL traditional PEM private key
    • an OpenSSH private key
    • a single certificate, PEM or DER
    • PKCS#7
  4. If the file is protected, enter the File password. The field appears when the file needs it. The password is used only to read the file and is never stored. A wrong or missing password is reported as a failed integrity check of the file, or as a key that could not be read.
  5. Review Detected content. Each entry is listed with its kind: Key pair, Certificate, Private key, Secret key or Signing request. An entry the chosen provider does not import is marked Not supported by provider, and a signing request is listed but cannot be imported.
  6. For the key entries, fill in the Key destination:
    • Token profile — only profiles whose provider imports the key's type and algorithm are offered
    • Key name — taken from the entry's alias, or else from its certificate's common name
    • Exportable — shown only when the provider exports the type and algorithm of every selected key; see exportable keys
  7. Fill in the provider's Import attributes, when it has any, and the Key custom attributes. Certificate custom attributes appear whenever a certificate is selected.
  8. Click the import button, which counts the selected entries, for example Import 2 entries
  9. Read the Import results:
ResultWhat happened
ImportedThe entry was created by this import.
Already in inventoryThe entry was already in the inventory, and nothing changed.
Private key added to an existing keyThe private key was added to a key that held only its public key.
Certificate added to an existing keyThe key was already in the inventory, and its certificate is new.
Not importedThe entry failed, and the result shows the reason the platform gives.

Retry failed entries imports the failed entries again, after the file password is entered again for a protected file. Back to edit returns to the selection.

What an import does​

  • An import never overwrites what the inventory holds: an entry already in it keeps its owner, groups, custom attributes, name and description.
  • A key held only as its public key, and in no token, is completed with the imported private key.
  • An entry whose key cannot be completed is refused: when you may not update the key, or when a token holds its public key without its private key. The result gives the reason, and names the key only when you may see it.
  • Key pairs and secret keys are imported separately: for a selection that mixes them, the import button stays disabled.
  • An imported key is registered disabled, and a key completed from its public key keeps its public key's state. Click Enable on the key before it signs, is exported, or is downloaded with its certificate.
  • The selected certificates are registered in the inventory, and each leaf certificate is associated with its key.

Limits​

A file is refused when it goes over any of these limits:

  • 5 MiB
  • 200 certificates, and 100 other entries (keys, secret keys and certificate requests together)
  • 10,000,000 key-derivation iterations across the whole file

Permissions​

Importing a key needs the importKey permission on keys, among the permissions an import needs.

Key material

Private keys are stored only in the cryptography provider, never in the platform.