Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
platform
active.directory
adsi
adsi.iis-admin
base
com_ole
complus_mts
component_svcs
database
directx
gdi
graphics_mm
internet.client
internet.server
internet.server.isapi-dev
localization
mapi
messaging
msi
mslayerforunicode
multimedia
networking
networking.ipv6
sdk_install
security
shell
telephony.tapi_2
telephony.tapi_3
telephony.tsp
telephony.wte
tools
ui
ui_shell
win_base_svcs
win16
  
 
date: Wed, 10 Sep 2008 07:32:19 -0700 (PDT),    group: microsoft.public.platformsdk.security        back       


Another reason for AcquireCredentialsHandle to fail with SEC_E_INTERNAL_ERROR...   
I've been writing an SSL socket server in C++ and testing it on XP
SP2.  I couldn't get past AcquireCredentialsHandle - it seemed that
whatever I did it failed with SEC_E_INTERNAL_ERROR.

Eventually I dusted off an old platform sdk cd, installed the samples,
and compiled the SSPI\SSL\WebServer demo.  Rather to my suprise it
worked fine, successfully using the certificate I'd cobbled together
with makecert, etc.  And of course its call to
AcquireCredentialsHandle succeeded.

I examined the difference between my code, and the psdk sample.  The
only additional thing I was doing was calling QuerySecurityPackageInfo
for the 'SChannel' package, before eventually calling
AcquireCredentialsHandle (on the UNISP_NAME one) - which was failing
with SEC_E_INTERNAL_ERROR

I removed the call to QuerySecurityPackageInfo (I'd only put it in,
some time ago, for debugging purposes), and AcquireCredentialsHandle
started working.

The bottom line - if AcquireCredentialsHandle is failing with
SEC_E_INTERNAL_ERROR, check whether you've previously called
QuerySecurityPackageInfo for a different package.  If you have, maybe
that's why you're getting the error.

Hopefully some people will find this post useful.  It'll also help me
if I ever have to do this SSPI/SChannel stuff again!

--
Colin
date: Wed, 10 Sep 2008 07:32:19 -0700 (PDT)   author:   Colin

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us