Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

Error message in Windows Server 2003 and in Windows XP Professional: "ERROR_WINHTTP_CLIENT_AUTH_CERT_NEEDED"


View products that this article applies to.

Symptoms

When you try to retrieve information from the Secure Sockets Layer (SSL) certificate request message in Microsoft Windows Server 2003 or in Microsoft Windows XP Professional with Service Pack 2 (SP2), you may receive an error message that is similar to the following:
ERROR_WINHTTP_CLIENT_AUTH_CERT_NEEDED

↑ Back to the top


Resolution

Windows Server 2003

Service pack information

To resolve this problem, obtain the latest service pack for Windows Server 2003. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
889100 How to obtain the latest service pack for Windows Server 2003

Hotfix information

A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next software update that contains this hotfix.

If the hotfix is available for download, there is a "Hotfix download available" section at the top of this Knowledge Base article. If this section does not appear, contact Microsoft Customer Service and Support to obtain the hotfix.

Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft Web site: Note The "Hotfix download available" form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language.
Prerequisites
Because of file dependencies, this hotfix requires Windows Server 2003 Service Pack 1 (SP1).

Note x64-based versions of Windows Server 2003 contain SP1.
Restart requirement
You must restart the computer after you apply this software update.
Hotfix replacement information
This hotfix replaces hotfix 902454.
File information
The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.
Windows Server 2003 with SP1, 32-bit versions
File nameFile versionFile sizeDateTimePlatform
Winhttp.dll5.2.3790.2551361,98419-Oct-200501:46x86
Winhttp.manNot Applicable1,17319-Oct-200501:48Not Applicable
Winhttp.manNot Applicable59719-Oct-200501:48Not Applicable
Windows Server 2003, x64-based versions
File nameFile versionFile sizeDateTimePlatform
Winhttp.dll5.2.3790.2551521,21618-Oct-200511:11x64
Winhttp.manNot Applicable1,17518-Oct-200511:11Not Applicable
Winhttp.manNot Applicable60118-Oct-200511:11Not Applicable
Winhttp.dll5.2.3790.2551361,98418-Oct-200511:11x86
Winhttp.manNot Applicable1,17318-Oct-200511:11Not Applicable
Winhttp.manNot Applicable59718-Oct-200511:11Not Applicable
Windows Server 2003 with SP1, Itanium-based versions
File nameFile versionFile sizeDateTimePlatform
Winhttp.dll5.2.3790.25511,020,41618-Oct-200511:10IA-64
Winhttp.manNot Applicable1,17418-Oct-200511:10Not Applicable
Winhttp.manNot Applicable59918-Oct-200511:10Not Applicable
Winhttp.dll5.2.3790.2551361,98418-Oct-200511:10x86
Winhttp.manNot Applicable1,17318-Oct-200511:10Not Applicable
Winhttp.manNot Applicable59718-Oct-200511:10Not Applicable

Windows XP Professional

Hotfix information

To resolve this problem for Microsoft Windows XP Professional, install the hotfix that is described in Microsoft Knowledge Base article 919477. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
919477 WinHTTP may not connect through a proxy server if proxy auto-configuration is used for Internet Explorer connectivity in Windows XP

↑ Back to the top


Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section. This problem was first corrected in Windows Server 2003 Service Pack 2.

↑ Back to the top


More information

When a client that has multiple certificates available connects to a server that requires a certificate, the client cannot know what certificate the server requested. The client must manually try each certificate until the client finds a certificate that the server accepts.

This hotfix provides a new Windows HTTP Services (WinHTTP) option to request the certificate information from the server so that the client can present the correct certificate.

Note The header value for the new option is 94.

The sample code for the new Windows HTTP Services (WinHTTP) option is similar to the following code.
//Here is the header value.
#define WINHTTP_OPTION_CLIENT_CERT_ISSUER_LIST 94
//Here is a sample usage for the new option WINHTTP_OPTION_CLIENT_CERT_ISSUER_LIST.
#include <schannel.h>
SecPkgContext_IssuerListInfoEx* pIssuerList = NULL;
DWORD dwBufferSize = sizeof(SecPkgContext_IssuerListInfoEx*);
If (WinHttpQueryOption(hRequest,
                       WINHTTP_OPTION_CLIENT_CERT_ISSUER_LIST,
                       &pIssuerList,
                       & dwBufferSize) == TRUE)
{
            // TODO: insert code to use / filter the issuer list
            GlobalFree(pIssuerList); // free the issuer list when done
}

//Here is a sample usage of the issuer list retrieved from above. The example finds the certificate in the certificate store that matches the issuer list.

PCERT_CONTEXT pClientCert = NULL;
CERT_CHAIN_FIND_BY_ISSUER_PARA SrchCriteria;
::ZeroMemory(&SrchCriteria, sizeof(CERT_CHAIN_FIND_BY_ISSUER_PARA));
SrchCriteria.cbSize = sizeof(CERT_CHAIN_FIND_BY_ISSUER_PARA);
SrchCriteria.cIssuer = pIssuerList->cIssuers;
SrchCriteria.rgIssuer = pIssuerList->aIssuers;
PCCERT_CHAIN_CONTEXT pClientCertChain = 
CertFindChainInStore(
    pCacheEntry->_ClientCertStore,
        X509_ASN_ENCODING,
        CERT_CHAIN_FIND_BY_ISSUER_CACHE_ONLY_URL_FLAG |
            // Do not perform wire download when building chains
        CERT_CHAIN_FIND_BY_ISSUER_CACHE_ONLY_FLAG,
            // Do not search pCacheEntry->_ClientCertStore 
            // for issuer certificates
        CERT_CHAIN_FIND_BY_ISSUER,
        &SrchCriteria,
        NULL);
if (pClientCertChain)
{
pClientCert = 
    pClientCertChain->rgpChain[0]->rgpElement[0]->pCertContext;
     CertDuplicateCertificateContext(pClientCert);
     CertFreeCertificateChain(pClientCertChain);
     pClientCertChain = NULL;
     fRet = TRUE;
}
For more information, visit the following Microsoft Developer Network (MSDN) Web site:

↑ Back to the top


Keywords: kbautohotfix, kbwinserv2003sp2fix, kbfix, kbbug, kbhotfixserver, kbqfe, KB909425

↑ Back to the top

Article Info
Article ID : 909425
Revision : 7
Created on : 10/11/2007
Published on : 10/11/2007
Exists online : False
Views : 540