Skip to content

Conversation

@reta
Copy link
Member

@reta reta commented Jan 12, 2025

The SSLIOSession::write does not handle SSLEngineResult#BUFFER_OVERFLOW. The suggested fix it to make sure there is enough place in the output buffer to store SSLSession#getPacketBufferSize() bytes. Closes https://issues.apache.org/jira/browse/HTTPCORE-775

…#BUFFER_OVERFLOW

Signed-off-by: Andriy Redko <drreta@gmail.com>
Copy link
Member

@ok2c ok2c left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@reta Awesome! Looks really good!

.loadKeyMaterial(keyStoreURL, storePassword.toCharArray(), storePassword.toCharArray());

if (protocol != null) {
sslContextBuilder = sslContextBuilder.setProtocol(protocol);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@reta It should be OK to pass null to #setProtocol

this(scheme, null);
}

public H2CoreTransportTest(final URIScheme scheme, final String protocol) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@reta Can we give the variable a better name to make it clearer what protocol it is? tlsVersion or tlsProtocol maybe?

Signed-off-by: Andriy Redko <drreta@gmail.com>
@reta
Copy link
Member Author

reta commented Jan 13, 2025

@reta Awesome! Looks really good!

Thanks a lot for the review @ok2c , review comments addressed, thank you

@ok2c ok2c merged commit 6681eb7 into apache:master Jan 14, 2025
10 checks passed
@ok2c
Copy link
Member

ok2c commented Jan 14, 2025

@reta Cherry-picked to 5.3.x

@patrickjamesbarry
Copy link

We believe we hit this bug, and grateful for fix. However, are their any timeouts that should of had an impact on this infinite loop?

@reta
Copy link
Member Author

reta commented May 14, 2025

We believe we hit this bug, and grateful for fix. However, are their any timeouts that should of had an impact on this infinite loop?

I think the loop is infinite in theory, what is happening under the hood is just buffer adjustment: should be quick and only could fail with allocation exception. I am wondering have you seen the infinite spin in the wild? Thank you.

@patrickjamesbarry
Copy link

patrickjamesbarry commented May 14, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants