EldoS | Feel safer!

Software components for data protection, secure storage and transfer

SetUseInternalSocket causes stack overflow in TElSimpleSSLClient

Also by EldoS: Solid File System
A virtual file system that offers a feature-rich storage for application documents and data with built-in compression and encryption.
#25709
Posted: 07/17/2013 21:00:40
by Paul Carew (Basic support level)
Joined: 01/21/2013
Posts: 6

I'm trying to use the SetUseInternalSocket(false) method of the SBB TElSimpleSSLClient class.

Whenever I call this method, java falls over with multiple stack overflow messages. Does this method use / cause to be used a recursive call anywhere?

Here is the error from the Android logcat:
dalvikvm(742): threadid=21: stack overflow on call to LSecureBlackbox/SSLClient/TElSimpleSSLClient;.SetUseInternalSocket:VZ

Here is the code snippet:
Code
   TElSimpleSSLClient   secureClient = null;
   secureClient = new TElSimpleSSLClient();
   secureClient.SetEnabled(true);
   secureClient.SetVersions((short) (SBSSLConstants.sbSSL2 | SBSSLConstants.sbSSL3 |   SBSSLConstants.sbTLS1));

        secureClient.SetOnCertificateValidate(new TSBCertificateValidateEvent(ElSecureClientCertificateValidate));
        secureClient.SetOnCloseConnection(new TSBCloseConnectionEvent(ElSecureClientCloseConnection));
        secureClient.SetOnCiphersNegotiated( new TNotifyEvent(ElSecureClientCiphersNegotiated));
        
        secureClient.SetUseInternalSocket(false);
        Log.d(logTag(),"Set Internal Socket to false");

The log message never gets printed as the method causes a stack overflow

It doesn't seem to matter what the parameter value is. Either 'true' or 'false' causes the stack overflow.
If I leave off the method call, the initialization continues, but I need to be able to use an external socket connection.

Thanks
Paul.
#25710
Posted: 07/18/2013 00:49:22
by Eugene Mayevski (EldoS Corp.)

Thank you for the report.

The value is true by default and there's no need to set it to true manually.

We will check the issue with setting it to false and will let you know the outcome ASAP.


Sincerely yours
Eugene Mayevski
#25714
Posted: 07/18/2013 01:57:06
by Vsevolod Ievgiienko (EldoS Corp.)

Indeed the problem exists. The fix will be included into the next SecureBlackbox build.
#25716
Posted: 07/18/2013 02:31:35
by Eugene Mayevski (EldoS Corp.)

Just a note: the issue is in the compiler which incorrectly generated property setter. We've reported it to the compiler vendor.


Sincerely yours
Eugene Mayevski
#25732
Posted: 07/18/2013 11:16:15
by Paul Carew (Basic support level)
Joined: 01/21/2013
Posts: 6

Are there any work arounds? maybe using Java Reflection to set the value?
I really want to be able to use an external socket implementation.
#25733
Posted: 07/18/2013 11:18:41
by Eugene Mayevski (EldoS Corp.)

Are you trying version 10 or version 11 now? I believe compiler bug was introduced in one of recent compiler updates so maybe version 10 still works (I can't say for sure, unfortunately). In any case, we'll address this problem in one way or another in the next build of SBB 11 pre-release.


Sincerely yours
Eugene Mayevski
#25734
Posted: 07/18/2013 11:41:08
by Paul Carew (Basic support level)
Joined: 01/21/2013
Posts: 6

Good to hear that it will be addressed in the next version.

As to what version I'm trying right now, I'm not completely sure what the version number is/was. I tried looking in the SBB SSL Client Jar manifest and there was no indication.

It would be great if your build/release system could add an entry in the Java Manifest of the Jar files to indicate the date and version of the release.


It looks like the date of the class files inside the Jar is Feb 28th 2013
What version does that equate to?
#25735
Posted: 07/18/2013 11:44:17
by Eugene Mayevski (EldoS Corp.)

That's version 10. Looks like the bug is older than we thought :(

Thank you for suggestion about using manifest to indicate the version - we will surely do this. Right now version can be checked in runtime - there's SBUtils.SBB_VERSION string constant available which contains build number (this is enough to get all information as all builds are listed in changes.txt file). Also you can check time, of course, and it will correspond to the listing in changes.txt.


Sincerely yours
Eugene Mayevski
#25746
Posted: 07/20/2013 14:53:46
by Paul Carew (Basic support level)
Joined: 01/21/2013
Posts: 6

While we await a new version of SBB with this problem resolution, I have developed a work-around

I created a subclassof TElSimpleSSLClient and ensured that it was part of the same SBB package of TElSimpleSSLClient

Code
package SecureBlackbox.SSLClient;
import android.util.Log;
/**
* @author PaulCarew
*
*/
public class TmpSBBSSLClient extends TElSimpleSSLClient {

   /**
    *
    */
   public TmpSBBSSLClient() {
      super();
   }
   @Override
   public void SetUseInternalSocket(boolean value)
   {
         Log.i("Temp SBB SSL Client",
            "InternalSocket currently set to:"+FUseInternalSocket);

      this.FUseInternalSocket = value;

         Log.i("Temp SBB SSL Client",
            "InternalSocket now set to:"+FUseInternalSocket);
      
   }
}
#25748
Posted: 07/22/2013 02:03:36
by Vsevolod Ievgiienko (EldoS Corp.)

Thanks for posting the workaround. We are still waiting for response from compiler vendor.
Also by EldoS: Callback File System
Create virtual file systems and disks, expose and manage remote data as if they were files on the local disk.

Reply

Statistics

Topic viewed 1353 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!