| Previous | Next |
| STATUS_PCP_NO_KEY_CERTIFICATION | STATUS_PCP_ATTESTATION_CHALLENGE_NOT_SET |
STATUS_PCP_KEY_NOT_FINALIZED
The key was created or configured but is not yet usable
STATUS_PCP_KEY_NOT_FINALIZED identifies a key lifecycle error. In the CNG model, a persisted key can be created and have properties set before it is finalized; it cannot be used until the finalization step completes. The status therefore points to ordering, not automatically to a TPM hardware fault.
The distinction matters in code review: setting a property after an asynchronous handoff, losing the key handle, or returning from setup before finalization can all leave a durable-looking object that the caller still cannot use.
What to check
- Verify that creation, required property assignment, and
NCryptFinalizeKeyoccur in the documented order and that each status is checked. - Record whether the key is persisted or ephemeral and whether another process may attempt to use it before setup completes.
- Do not silently fall back to a software key: that changes the security property the caller may be trying to enforce.
References
- Microsoft: NCryptCreatePersistedKey
- Microsoft: PCP and TPM error codes
- Microsoft: CNG Key Storage Providers
Looking for a different code? Search another status or error code.