List of usage examples for javax.net.ssl SSLEngine wrap
public SSLEngineResult wrap(ByteBuffer[] srcs, ByteBuffer dst) throws SSLException
From source file:org.apache.hc.client5.http.impl.auth.CredSspScheme.java
private void wrap(final ByteBuffer src, final ByteBuffer dst) throws AuthenticationException { final SSLEngine sslEngine = getSSLEngine(); try {/*from w w w .j a v a 2 s .c o m*/ final SSLEngineResult engineResult = sslEngine.wrap(src, dst); if (engineResult.getStatus() != Status.OK) { throw new AuthenticationException("SSL Engine error status: " + engineResult.getStatus()); } } catch (final SSLException e) { throw new AuthenticationException("SSL Engine wrap error: " + e.getMessage(), e); } }