tag:blogger.com,1999:blog-1842779882966131116.post1196820129030232700..comments2023-03-22T07:04:49.896-07:00Comments on techno blog of a former coder: How to do windows logon with smartcardSergey Rogachovhttp://www.blogger.com/profile/07474275980314435809noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-1842779882966131116.post-32777284963929727902012-06-01T06:41:46.224-07:002012-06-01T06:41:46.224-07:00I am trying to perform a CP for Windows 7. However...I am trying to perform a CP for Windows 7. However with all the documented and undocumented structures, and trying all type of pointers and all. I am still getting the same "Invalid Parameter".<br /><br />Are there any recommendations on what I can debug or check?mcschehttps://www.blogger.com/profile/04395740423463564057noreply@blogger.comtag:blogger.com,1999:blog-1842779882966131116.post-63772244106981907122009-06-25T05:27:08.048-07:002009-06-25T05:27:08.048-07:00Adam, Why do you need PKI implementation for Vis...Adam, Why do you need PKI implementation for Vista. I believe it is native and works ok.<br />Anyway the only way to verify if you are doing everything correctly is to dump structure from the native implementation when it is passed to LsaLogonUser. And then compare to yours structure. you can use windbg to do so. I used SoftIce on Xp to diagnose the errors.Sergey Rogachovhttps://www.blogger.com/profile/07474275980314435809noreply@blogger.comtag:blogger.com,1999:blog-1842779882966131116.post-49646311424596545562009-06-23T13:31:07.738-07:002009-06-23T13:31:07.738-07:00Does anyone know if it would work als with certifi...Does anyone know if it would work als with certificates installed in the Computer/My Store if I pass the right container name and leave CardName and CardReader to an empty string? Any help would be really apreciated.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1842779882966131116.post-46438836911854049292009-06-07T20:08:52.146-07:002009-06-07T20:08:52.146-07:00Nevermind, looks like I was doing everything corre...Nevermind, looks like I was doing everything correctly, but Vista was just not treating my credentials correctly.adamhttps://www.blogger.com/profile/05422683779845317723noreply@blogger.comtag:blogger.com,1999:blog-1842779882966131116.post-66142406595681710562009-05-29T23:11:17.375-07:002009-05-29T23:11:17.375-07:00Thanks for posting this. I am trying to do the sa...Thanks for posting this. I am trying to do the same thing and am running into mysterious failures and am not entirely sure what I'm doing wrong. I have a few questions for you, if you have the time:<br /><br />1) For all the offset parameters in the CSP info struct, did you specify them in terms of characters or bytes (if Unicode)?<br /><br />2) Was nCardNameOffset always 0 for you? I can't see any reason why it wouldn't be 0.<br /><br />3) Is dwCspInfoLen always 2 * sizeof(DWORD) + 4 * sizeof(ULONG) + 1024 * sizeof(TCHAR) or does it depend on the actual lengths of the buffers provided if the full 1024 characters are not used?<br /><br />4) Is CspDataLength always equal to dwCspInfoLen? It seems weird for them to want both parameters if they are always the same thing.<br /><br />5) Let's say you have a FullPacket pointer named packet. Am I correct in saying that packet->smartCardLogon.CspData = (DWORD)&(packet->cspInfo) - DWORD)&(packet->smartCardLogon).<br /><br />Once again, thanks for any help you can give me.<br /><br />5)adamhttps://www.blogger.com/profile/05422683779845317723noreply@blogger.com