Coder Social home page Coder Social logo

Comments (4)

pasis avatar pasis commented on July 28, 2024

SEC_E_INCOMPLETE_MESSAGE is not critical error and ideally should be handled in the code (according to [1] and [2]).

But the actual problem is in sock_read(). select() returns 1 indicating that there is a descriptor ready to read. But reading with recv() returns 0 which means the connection is shutdown from server side.

Update: connection is closed after the 1st sock_write() to the socket:

sent = sock_write(tls->sock, writebuff, writelen);

from libstrophe.

pasis avatar pasis commented on July 28, 2024

Root cause of the problem is in the SupportedAlgs. Seems, my server doesn't like RC4. As these fields are optional I left cSupportedAlgs/palgSupportedAlgs zeroed to use default system configuration and tls_start() returned without errors. But 1st tls_read() (after a tls_write()) returns SEC_E_UNSUPPORTED_FUNCTION.

There is question on stackoverflow, but without solution: http://stackoverflow.com/questions/24204082/decryptmessage-returning-sec-e-unsupported-function

from libstrophe.

pasis avatar pasis commented on July 28, 2024

I backported a patch from a libstrophe fork which is related to the incomplete message issue: 886f455 .

from libstrophe.

pasis avatar pasis commented on July 28, 2024

With the patch from the previous comment, schannel implementation works on VS2017/Win10. However, I needed to fix few compilation errors and LoadLibrary() didn't load any dll for unknown reason.

I couldn't make it work in VS6/WinXP though. InitializeSecurityContext() returned 0x80090318 repeatedly.

Closing this issue.

from libstrophe.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.