locked
SecPkgContext_ConnectionInfo::aiCipher returned from QueryContextAttributes() API not returning complete cipher info RRS feed

  • Question

  • I am using MSCAPI security package for secure connection. I am querying for ciphers used during secure connection. as shown below.
     
    QueryContextAttributes(phCtxt, SECPKG_ATTR_CONNECTION_INFO, &connectInfo)

    And I am copying the ciphers returned by API.

    *cipherAlg = connectInfo.aiCipher

    The possible return values are CALG_AES_128, CALG_AES_256, CALG_DES etc.

    With above information it is not possible to contruct a complete cipher value used during secure connection.

    For Ex: Secure connection is established with cipher TLS_RSA_WITH_AES_256_GCM_SHA384, However It is not possible to know the other attributes of the cipher used( GCM, RSA) using QueryContextAttributes() function.

    Is there single API through which I can get all the attributes of cipher spec used for seecure connection? For Ex, RSA/DHE, GCM/CBC, SHA256/SHA384 etc. 

    Or do I need to query for these other attributes missing from SecPkgContext_ConnectionInfo::aiCipher individually?

    Thanks,
    NARESH
    Thursday, July 7, 2016 10:58 AM