locked
Solving ERROR_WINHTTP_CLIENT_CERT_NO_PRIVATE_KEY error RRS feed

  • Question

  • Hi,

    I am currently creating a test application that uses WinHTTP APIs to connect to a server that supports SSL. My problem is that when the client certificate was imported in the "ROOT" location (programmatically), calls WinHTTPSetOption that specifies the certificate context, and then call WinHTTPSendRequest.
    An ERROR_WINHTTP_CLIENT_CERT_NO_PRIVATE_KEY(12185) error occurs.

    Please help.

    Thanks!
    Thursday, October 29, 2009 6:06 AM

Answers

  • Hi Ronnie1987,

    ERROR_WINHTTP_CLIENT_CERT_NO_PRIVATE_KEY shows the context for the SSL client certificate does not have a private key associated with it. The client certificate may have been imported to the computer without the private key. Please check it. For your reference, please see following documents, maybe it will helps: 

     

    ·          Error Messages

    ·          What's New in Windows Server 2008 and Windows Vista

     

    Best Regards,

    Nancy



     


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Marked as answer by Nancy Shao Thursday, November 5, 2009 2:16 AM
    Monday, November 2, 2009 9:58 AM