Menu

#2263 Incorrect declarations for CryptEnumProvidersA and CryptEnumProvidersW

WSL
closed
None
Bug
fixed
IINR_-_Include_In_Next_Release
False
2015-09-30
2015-07-04
No

In the Windows header files the declarations of CryptEnumProvidersA and CryptEnumProvidersW are:

WINADVAPI BOOL WINAPI 
CryptEnumProvidersA(DWORD,DWORD*,DWORD,DWORD*,LPTSTR,DWORD*);
WINADVAPI BOOL WINAPI 
CryptEnumProvidersW(DWORD,DWORD*,DWORD,DWORD*,LPTSTR,DWORD*);

These are the correct declaration for CryptEnumProviders but are incorrect for the ansi and unicode versions. The correct declarations are:

WINADVAPI BOOL WINAPI 
CryptEnumProvidersA(DWORD,DWORD*,DWORD,DWORD*,LPSTR,DWORD*);
WINADVAPI BOOL WINAPI 
CryptEnumProvidersW(DWORD,DWORD*,DWORD,DWORD*,LPWSTR,DWORD*);

Discussion

  • Keith Marshall

    Keith Marshall - 2015-08-11

    Similarly incorrect:

    BOOL WINAPI
    CryptGetDefaultProvider( DWORD, DWORD, DWORD, LPTSTR, DWORD );
    

    has implementation prototypes:

    BOOL WINAPI
    CryptGetDefaultProviderA( DWORD, DWORD, DWORD, LPSTR, DWORD );
    BOOL WINAPI
    CryptGetDefaultProviderW( DWORD, DWORD, DWORD, LPSTR, DWORD );
    

    the first of which is correct, but the second is not; it should be:

    BOOL WINAPI
    CryptGetDefaultProviderW( DWORD, DWORD, DWORD, LPWSTR, DWORD );
    
     
  • Keith Marshall

    Keith Marshall - 2015-08-11
    • status: unread --> open
    • assigned_to: Keith Marshall
     
  • Keith Marshall

    Keith Marshall - 2015-08-11

    Also incorrectly defined:

    #define szOID_CRL_DIST_POINTS  2.5.29.31
    

    This manifest constant should represent a const char * ASCIIZ string; the definition is lacking its quotes:

    #define szOID_CRL_DIST_POINTS  "2.5.29.31"
    
     
  • Keith Marshall

    Keith Marshall - 2015-09-30
    • status: open --> closed
    • Resolution: none --> fixed
    • Category: Unknown --> IINR_-_Include_In_Next_Release
     
  • Keith Marshall

    Keith Marshall - 2015-09-30

    This is fixed by commit [0a93cd], on the legacy branch, (which is derived from w32api-3.x, and which I intend to make the basis for w32api-5.x). I've also fixed the additional defects I've noted, beyond the original submission, and added tentative definitions for some entities noted (in the w32api-3.17 header) as inadequately documented on MSDN, (where I believe the MSDN documentation may have been improperly interpreted by the original contributor); such tentative definitions are occluded behind a (new) MINGW_TENTATIVE_ASSUMPTIONS conditional guard.

     

    Related

    Commit: [0a93cd]