![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Problem with CryptRegisterOIDInfo in Microsoft "Longhorn" Server Beta2 When I call CryptRegisterOIDInfo with pInfo parameter pointing on "old-style" CRYPT_OID_INFO structure (cbSize = 28) without pwszCNGAlgid and pwszCNGExtraAlgid members, I get error about invalid parameter. If use CRYPT_OID_INFO with new members (csSize = 36) it's OK. Usually, there are back-compatibility in CryptoAPI for such changes... The repro-example is: typedef struct _CRYPT_OID_INFO_LH { DWORD cbSize; LPCSTR pszOID; LPCWSTR pwszName; DWORD dwGroupId; union { DWORD dwValue; ALG_ID Algid; DWORD dwLength; }; CRYPT_DATA_BLOB ExtraInfo; LPCWSTR pwszCNGAlgid; LPCWSTR pwszCNGExtraAlgid; } CRYPT_OID_INFO_LH, *PCRYPT_OID_INFO_LH; CRYPT_OID_INFO OIDInfo = { sizeof(CRYPT_OID_INFO), "1.2.3", L"Test", CRYPT_ENHKEY_USAGE_OID_GROUP_ID }; CRYPT_OID_INFO_LH OIDInfoLH = { sizeof(CRYPT_OID_INFO_LH), "1.2.3", L"Test", CRYPT_ENHKEY_USAGE_OID_GROUP_ID }; OIDInfoLH.pwszCNGAlgid = L""; OIDInfoLH.pwszCNGExtraAlgid = L""; DWORD dwError; BOOL res; res = CryptRegisterOIDInfo(&OIDInfo, 0); // res: FALSE dwError = GetLastError(); //dwError :0x80070057 res = CryptRegisterOIDInfo((PCCRYPT_OID_INFO)&OIDInfoLH, 0); //res: TRUE |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Re: "Virtual Server 2005 R2 SP1" on "Windows Web Server 2008" host? | Virtual Server | |||
| New Problem - "From" Address format in "Microsoft Communities" | Live Mail | |||
| Windows Server "Longhorn" (Vista Server ??) | Vista General | |||
| New updates for WinVista & "Longhorn" Server -> Beta 2 | Vista General | |||
| Longhorn Beta2: Error on adding Role "Windows Sharepoint Services" | Vista installation & setup | |||