RestComm / jain-sip

Disclaimer: This repository is a git-svn mirror of the project found at http://java.net/projects/jsip whose original repository is developed collaboratively by the Advanced Networking Technologies Division at the National Institute of Standards and Technology (NIST) - an agency of the United States Department of Commerce and by a community of individual and enterprise contributors. TeleStax, Inc. will perform some productization work, new features experimentation branches, etc for its TelScale jSIP product that doesn't concern the community from the main repository hence this git repository.
http://www.restcomm.com/
144 stars 152 forks source link

SSLEngine returns NOT_HANDSHAKING instead of FINISHED in Android Oreo #170

Open atsakiridis opened 6 years ago

atsakiridis commented 6 years ago

As a result SSL handshake is hanging and negotiation never ends.

Scenario:

Analysis

As a result sslEngine never returns FINISHED state and this messes up the state machine and freezes the handshake. In the successful scenario (i.e. pre-Oreo) unwrap is called once and returns 75 bytes (both Change Cipher Spec and Finished packet) with a state of FINISHED.

I think we need to workaround this issue in the JAIN SIP side for the short them, similar to:

At the same time I have opened a ticket for android that I plan to follow up on, so that if we 're lucky this gets fixed down the road in Android/SSL as well.

jaimecasero commented 6 years ago

potentially add more logging during SSL handshaking for better debugging...