none
The private key is not present in X.509 certificate RRS feed

  • Question

  • Hi, I'm trying to add the root and intermediate credentials to a client and I keep getting a "The private key is not present in the X.509 certificate" 

    However, when I look at the certificates there is nothing in the certificate that says it has a private key.  So, I'm thinking I'm adding the Intermediate certificate incorrectly.

    The code I have is as follows:

    //Root Certificate
    client.ClientCredentials.ClientCertificate.SetCertificate(
                    StoreLocation.LocalMachine,
                    StoreName.Root,
                    X509FindType.FindByIssuerName,
                    "Root Certificate");

    //Intermediate Certificate
    client.ClientCredentials.ClientCertificate.SetCertificate(
                    StoreLocation.LocalMachine,
                    StoreName.CertificateAuthority,
                    X509FindType.FindByIssuerName,
                    "Intermediate Certificate");

    Am I getting that error because I'm adding the Intermediate Certificate incorrectly?

    Any help would be appreciated!  And, thank you!

    Thursday, January 24, 2019 10:58 PM

All replies