Windows 10: QueryContextAttributes and DecryptMessage throwing error after successful handshake

Discus and support QueryContextAttributes and DecryptMessage throwing error after successful handshake in Windows 10 Network and Sharing to solve the problem; QueryContextAttributes &hContext, SECPKG_ATTR_SIZES, &Sizes ;hContext is the lastest one, updated by acceptsecuritycontext . similarly ,... Discussion in 'Windows 10 Network and Sharing' started by rajliyanth, Apr 29, 2021.

  1. QueryContextAttributes and DecryptMessage throwing error after successful handshake


    QueryContextAttributes &hContext, SECPKG_ATTR_SIZES, &Sizes ;hContext is the lastest one, updated by acceptsecuritycontext . similarly , DecryptMessagephContext, &Message, 0, NULL; is throwing error :SEC_E_INVALID_HANDLE - A context handle that is not valid was specified in the phContext parameter.

    :)
     
    rajliyanth, Apr 29, 2021
    #1
  2. Callender Win User

    Intermittent problems with TLS handshake and being timed out

    Check DNS settings for both network adapters. Your Wifi might be set to use a different DNS server.

    Getting message when trying to connect - Windows 10 Forums

    Option Two follow steps then pick a DNS server from the list in item 7. Personally I use CloudFlare DNS

    EDIT: Reset router first as already suggested.
     
    Callender, Apr 29, 2021
    #2
  3. M Mueller Win User
    Schannel: clent end receiving a renegotiation token through DecryptMessage causes EncryptMessage to immediately fail with SEC_E_CONTEXT_EXPIRED (0x80090317)

    I work on some internal communications libraries, and recently came across a problem recently with some of our unit tests involving Schannel and renegotiation. These unit tests exercise a state machine that recognizes a few states of the established security
    context including "Authenticated", "RenegotiatePending" and "Renegotiate".

    According to MSDN's articles on DecryptMessage and EncryptMessage, it is made clear that these methods can be called on separate threads concurrently with the same security context, though two instances of DecryptMessage or EncryptMessage may not be called
    concurrently on separate threads when referring to the same security context. Renegotiation complicates matters by implying that, upon receipt of an alert token requesting renegotiation by the client from the server, the client must stop encrypting data to
    send, perform the authentication handshake again, and then start up the encryption cycle again once that's all done. Renegotiation is detected on the client end by DecryptMessage, which emits an error SEC_I_RENEGOTIATE when that's what's going on. When we
    get that error, we pause the encryption cycle occuring on its own thread, as mentioned before.

    However, as soon as DecryptMessage emits SEC_I_RENEGOTIATE, before we have the chance to pause the encryption cycle, calls to EncryptMessage yield the error SEC_E_CONTEXT_EXPIRED. This is problematic, because constructed encrypted messages are generated
    under a single security context.

    The idea that we could wait until encryption was complete and pause the cycle to proceed with renegotiation tasks used to work until we installed updates within the last month. I'm running on Windows 10 and see the failure, and we've seen this on Windows
    Server 2012 r2. I'm trying to collect more information.

    Of course, if I lock the EncryptMessage and DecryptMessage to the same thread, there is no issue, as expected. This is difficult to implement in our current environment, which is heavily threaded.

    Can anyone offer any suggestions, aside from a protocol re-do to support datagram fragmentation separated by renegotiation cycles? This really looks like a change in Schannel behavior.

    [Moved from: Windows / Windows 10 / Network & internet]
     
    M Mueller, Apr 29, 2021
    #3
  4. Gilbeh Win User

    QueryContextAttributes and DecryptMessage throwing error after successful handshake

    Intermittent problems with TLS handshake and being timed out

    Hi

    I have a new Dell laptop running Windows 10 and Kaspersky.

    When using MS Edge for Internet banking, I can sometimes connect straight through security and right through to statements. Other times I get the error code INET E CONNECTION TIMEOUT very quickly. There seems to be no rhyme nor reason when this will happen or how far into the bank site I get.

    Using Mozilla Firefox, I get the same intermittent problem but this time it gets stuck on TLS handshake and just goes round and round.

    I have just been successful in getting right through to statements at Lloyds on both browsers and have also ordered an item online successfully. So, I tried Halifax - no joy, now I get the error message or TLS handshake and on Firefox I can't even get Google, as it sticks on handshake for that site too.

    All the rest of the computer is fine and I can run BBC I-player OK.

    Any suggestions as to how to cure this would be welcome as it is very frustrating.

    Thanks.
     
    Gilbeh, Apr 29, 2021
    #4
Thema:

QueryContextAttributes and DecryptMessage throwing error after successful handshake

Loading...
  1. QueryContextAttributes and DecryptMessage throwing error after successful handshake - Similar Threads - QueryContextAttributes DecryptMessage throwing

  2. Throwing error in secure browser test

    in Windows 10 Gaming
    Throwing error in secure browser test: I have checked in to the exam and taken photos my mine, I’d proof , test space and done with all other steps but while doing secure browser test , I ended the open applications not even single application is open except onvue but still it throwing error to resolve the issue ,...
  3. microsoft.com website throwing error messages

    in Microsoft Windows 10 Store
    microsoft.com website throwing error messages: I've been trying to shop for a Microsoft tablet or laptop on microsoft.com but keep getting error messages when I try to view some of the pages.For example, I've tried to access the page for the Surface Go 3 https://www.microsoft.com/en-us/d/surface-go-3/904h27d0cbwn on...
  4. BSoD throwing the DPC_WATCHDOG_VIOLATION error

    in Windows 10 Gaming
    BSoD throwing the DPC_WATCHDOG_VIOLATION error: Hello, just yesterday I started getting BSoD throwing the DPC_WATCHDOG_VIOATION error, and it was the same day that my apartment got the wifi upgraded, so it may be in relation to that. I've tried updating my ssd drivers, my wifi adapter drivers, my graphics drivers, and I...
  5. BSoD throwing the DPC_WATCHDOG_VIOLATION error

    in Windows 10 Software and Apps
    BSoD throwing the DPC_WATCHDOG_VIOLATION error: Hello, just yesterday I started getting BSoD throwing the DPC_WATCHDOG_VIOATION error, and it was the same day that my apartment got the wifi upgraded, so it may be in relation to that. I've tried updating my ssd drivers, my wifi adapter drivers, my graphics drivers, and I...
  6. Excel 2010 throwing an error

    in Windows 10 Ask Insider
    Excel 2010 throwing an error: Hi. I've got excel 2010 installed on my windows 10 PC, and it opens and runs fine. The issue is when trying to open a saved doc, I get an error "This app can't run on your PC. To find a version for your PC, check with software publisher". I can open files if I open excel...
  7. TLS handshake with apod.nasa.gov fails

    in Windows 10 Network and Sharing
    TLS handshake with apod.nasa.gov fails: When I input the URL apod.nasa.gov into any Web browser on my Win 10 1903 Ethernet/fiber-connected tower, the status line says it's doing a TLS handshake with the site, but just sits there, and never connects, eventually giving the error "Problem loading page. Secure...
  8. Get-mpcomputerstatus throwing error

    in AntiVirus, Firewalls and System Security
    Get-mpcomputerstatus throwing error: Hi, When I am trying to get result from powershell command "Get-MpComputerStatus" it is throwing below error: [ATTACH] I have checked the WinDefend service it is in started status. Checked event logs it is showing caused due to unknown error. OS edition : Windows 7...
  9. Very slow internet handshakes

    in Windows 10 Network and Sharing
    Very slow internet handshakes: Since, I think, the Fall update - there have been a rash coming in over the last four days - all my browsers either fail or are slow (minutes) in making connections. Chrome just sleeps after I have clicked a link, Firefox says "performing TLS handshake" and then has a tea...
  10. Add printer throws an error

    in Windows 10 Drivers and Hardware
    Add printer throws an error: I can click add device but just pressing "add printer" throws immediately the error 0x07e saying The specified module can not be found. *Huh This is upgrade from windows 7 but all together installed about 3 weeks ago so pretty new installation. 12549