locked
Question about PCARD_SIGNING_INFO RRS feed

  • Question

  • Hi All,

    According to Microsoft documentation about PCARD_SIGNING_INFO data structure, the flag CARD_BUFFER_SIZE_ONLY is set when application requests for size of signature.

        // If CARD_BUFFER_SIZE_ONLY flag is present then the card
        // module should return only the size of the resulting
        // key in cbSignedData
        DWORD dwSigningFlags;

    But when I try to pass empty buffer and trying to retrieve the signature size, I could not see the flag being set. The dwSigningFlags is always zero. Under what situation this flag shall be set in dwSigningFlags.

    I'm using a CAPI based application to sign hash under Windows 7.

    The application code snippet.

    if(CryptSignHash(hHash,AT_KEYEXCHANGE,NULL,0,NULL,&dwSigLen)) 
    {
    printf("Signature length %d found.\n",dwSigLen);
    }

    Regards,

    Madhukar



    Tuesday, July 9, 2013 10:49 AM