none
Problem with custom CSP RRS feed

  • Question

  • Hello comunity.

    I'm writing a custom CSP, but I''m facing some problems. I've patched advapi32.dll for testing and wrote registry entryes so that my CSP is listed in Internet Explorer. I'm using Microsoft Active Directory Certificate Services to test the CSP.

    When i click to request a certificate the following function of my CSP are called (I wrote a log, and that's the result):

    CPAcquireContext(0, a54ea887-0a5f-4f3d-b8a8-9fd81b94bc94, CRYPT_NEWKEYSET, pVTable);
    CPGetProvParam(75508320, PP_NAME, 00000000, 0, 0)
    CPGetProvParam(75508320, PP_NAME, 001F5880, 10, 0)
    CPGetProvParam(75508320, PP_UNIQUE_CONTAINER, 00000000, 0, 0)
    CPGetProvParam(75508320, PP_UNIQUE_CONTAINER, 03F03E48, 37, 0)
    CPGetProvParam(75508320, PP_PROVTYPE, 0162A344, 4, 0)
    CPGetUserKey(75508320, AT_KEYEXCHANGE, phUserKey)
    CPDestroyKey(75508320, 123)
    CPGetUserKey(75508320, AT_KEYEXCHANGE, phUserKey)
    CPExportKey(75508320, 123, 0, PUBLICKEYBLOB, 0, 00000000, 0)
    CPExportKey(75508320, 123, 0, PUBLICKEYBLOB, 0, 03164560, 148)
    CPDestroyKey(75508320, 123)

    CPGetUserKey(75508320, AT_KEYEXCHANGE, phUserKey)
    CPExportKey(75508320, 123, 0, PUBLICKEYBLOB, 0, 00000000, 0)
    CPExportKey(75508320, 123, 0, PUBLICKEYBLOB, 0, 03164560, 148)
    CPDestroyKey(75508320, 123)
    CPGetProvParam(75508320, PP_ENUMALGS_EX, 0162A284, 88, CRYPT_FIRST)
    CPGetProvParam(75508320, PP_ENUMALGS, 0162A2DC, 32, CRYPT_FIRST)
    CPGetProvParam(75508320, PP_ENUMALGS, 0162A2DC, 32, 0)
    CPGetProvParam(75508320, PP_NAME, 00000000, 23243656, 0)
    CPGetProvParam(75508320, PP_NAME, 03F0A8A0, 10, 0)

    After calling CPGetProvParam with PP_NAME for the second time, IE crashes and show the error: Error: 0x80070715 - (unknown). I'm just returning the name of my CSP, don't know the reason for the crash. If I return "Microsoft Enhanced Cryptographic Provider v1.0" instead, the certificate is normally issued. Of course, returning the name of Microsoft CSP will result in Microsoft Active Directory Certificate Services trying to install the certificate in Windows repository (after clicking install certificate), which will be unsuccessfully because the keyset was not created.

    I'm stuck on that. The name I'm returning is the same of pVTable->pszProvName passed by Microsoft Active Directory Certificate Services when calling CPAcquireContext.

    Any help appreciated.

    I'm running Windows xp sp3

     

     


     

     

    M

     


    Monday, May 9, 2011 3:14 PM

All replies