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:
parent
7667361924
commit
20d4fda55e
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user