Return the correct pointer from ReferenceCountedOpenSslContext.context() and sslCtxPointer() (#8562)

Motivation:

We did not return the pointer to SSL_CTX put to the internal datastructure of tcnative.

Modifications:

Return the correct pointer.

Result:

Methods work as documented in the javadocs.
This commit is contained in:
Norman Maurer 2018-11-16 07:37:57 +01:00 committed by GitHub
parent 7667361924
commit 20d4fda55e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -421,13 +421,7 @@ public abstract class ReferenceCountedOpenSslContext extends SslContext implemen
*/
@Deprecated
public final long context() {
Lock readerLock = ctxLock.readLock();
readerLock.lock();
try {
return ctx;
} finally {
readerLock.unlock();
}
return sslCtxPointer();
}
/**
@ -502,7 +496,7 @@ public abstract class ReferenceCountedOpenSslContext extends SslContext implemen
Lock readerLock = ctxLock.readLock();
readerLock.lock();
try {
return ctx;
return SSLContext.getSslCtx(ctx);
} finally {
readerLock.unlock();
}