Giter Club home page Giter Club logo

niossl's People

Contributors

baswerc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

niossl's Issues

selector is not notified in some cases

Hi,

I found another bug: When using a Selector for the innser Stream it could be possible that the selector does not wake up even there is data to Read. This is caused through a unwrap inside the write-Method of the ssl engine
Example:
Registering WRITE | READ SelectionKey for inner socket in selector.
Selector call comes back, because data could be written to channel. During writing the channel receives other data (= read out from socket) which is unwrapped to the unwrapped buffer.

Afterwards we are back in the application flow. Now we are only interested in the answer (which is already unwrapped) so we set the interest to READ and trigger the select()-method of the application again.
At this point the select()-method will only return when there is another data incoming to the channel.

Regards,

Manuel

Memory leak

so much com.android.org.conscrypt.SSLEngineImpl not free that leads to memory leak
here is my code:
public static SSLSocketChannel open(SocketChannel socket) {
try {
SSLEngine sslEngine = null;
SSLContext sslContext = SSLContext.getDefault();
if( sslContext != null ) {
sslEngine = sslContext.createSSLEngine();
} else {
throw new Exception("create sslContext Failed");
}
if (sslEngine != null ) {
sslEngine.setUseClientMode(true);
} else {
throw new Exception("create sslEngine Failed");
}

  if( CommonService.ssllogger == null ) {
    CommonService.ssllogger = new SSLDebugInfo();
  }

  if( CommonService.executors == null ) {
    CommonService.executors = Executors.newFixedThreadPool(5);
  }

  return new SSLSocketChannel(socket,sslEngine,CommonService.executors,CommonService.ssllogger);
} catch ( Exception e ) {
  log("Exception!!!" + e.toString());
  return null;
}

}

no blocking read

Hi developer,

first of all thanks for this slim SSLChannel library! It makes a lot of things much easier.
I got to an point where I want to wait for data. I am in blocking mode, but read() and write() does not block at this point. The normal behavior would be that it returns when at least one byte could be read/written.

Regards,

Manuel

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.