| Previous | Next |
| NTE_BAD_PROV_TYPE | NTE_BAD_KEYSET |
NTE_BAD_PUBLIC_KEY
NTE_BAD_PUBLIC_KEY means that the public key returned by the cryptographic provider is invalid or does not match the public key expected by the caller. For certificate private-key acquisition, this can expose a mismatch between the certificate and the provider key.
What to verify
- Compare the certificate public key with the key exposed by the selected provider or key container.
- Confirm that the application did not select a similarly named but different certificate or key pair.
- Re-enroll, reimport, or rebind the certificate and private key from trusted material when the mismatch is real.
Microsoft: CryptAcquireCertificatePrivateKey
Looking for a different code? Search another status or error code.