Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8211227: Inconsistent TLS protocol version in debug output #2331

Closed
wants to merge 3 commits into from

Conversation

evwhelan
Copy link
Contributor

@evwhelan evwhelan commented Feb 1, 2021

Hi everyone,

Please review my fix for JDK-8211227

This supportability fix will result in a more consistent debug format when reading and writing TLS protocol versions.

Thanks,
Evan


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8211227: Inconsistent TLS protocol version in debug output

Reviewers

Download

$ git fetch https://git.openjdk.java.net/jdk pull/2331/head:pull/2331
$ git checkout pull/2331

@bridgekeeper
Copy link

bridgekeeper bot commented Feb 1, 2021

👋 Welcome back ewhelan! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added the rfr Pull request is ready for review label Feb 1, 2021
@openjdk
Copy link

openjdk bot commented Feb 1, 2021

@evwhelan The following label will be automatically applied to this pull request:

  • security

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the security security-dev@openjdk.org label Feb 1, 2021
@mlbridge
Copy link

mlbridge bot commented Feb 1, 2021

Webrevs

@openjdk
Copy link

openjdk bot commented Feb 1, 2021

@evwhelan This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8211227: Inconsistent TLS protocol version in debug output

Reviewed-by: xuelei, rhalade

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 296 new commits pushed to the master branch:

  • 7b924d8: 8261973: Shenandoah: Cleanup/simplify root verifier
  • 63f8fc8: 8259662: Don't wrap SocketExceptions into SSLExceptions in SSLSocketImpl
  • cf0019d: 8259942: Enable customizations in CompileJavaModules.gmk and Main.gmk
  • a6a7e43: 8242032: G1 region remembered sets may contain non-coarse level PRTs for already coarsened regions
  • d7eebda: 8261391: ZGC crash - SEGV in RevokeOneBias::do_thread
  • 5b7b18c: 8259800: timeout in tck test testForkJoin(ForkJoinPool8Test)
  • 419717d: 8261803: Remove unused TaskTerminator in g1 full gc ref proc executor
  • 011f5a5: 8261799: Remove unnecessary cast in psParallelCompact.hpp
  • e9d7c07: 8248318: Remove superfluous use of boxing in ObjectStreamClass
  • 6b7575b: 8228748: Remove GCLocker::_doing_gc
  • ... and 286 more: https://git.openjdk.java.net/jdk/compare/aec037721cf8990c3f7c4364730812447e0811e1...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@XueleiFan, @rhalade) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Feb 1, 2021

/*
* This test runs in another process so we can monitor the debug
* results. The OutputAnalyzer must see correct debug output to return a
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
* results. The OutputAnalyzer must see correct debug output to return a
* results. The OutputAnalyzer must see correct debug output to return a

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Blank space removed

private void simpleSSLConnectionTest() throws Exception {
// Re-enabling as test depends on these algorithms
SecurityUtils.removeFromDisabledTlsAlgs("TLSv1", "TLSv1.1");
var url = new URL("https://jpg-data.us.oracle.com/");
Copy link
Member

Choose a reason for hiding this comment

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

This URL is not accessible outside.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks Rajan,

I'm going to change my approach for this test, I will set up a dummy server on localhost and create my URL based off that, rather than URLs pointing to an existing site


public class LoggingFormatConsistency {
public static void main(String[] args) throws Exception {
if (args.length == 0){
Copy link
Member

Choose a reason for hiding this comment

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

Please add a comment to explain when the test should be run with parameter.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done! Thanks

*
* Fork off the other side, then do your work.
*/
LoggingFormatConsistency() throws Exception {
Copy link
Member

Choose a reason for hiding this comment

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

Have you looked at the templates available at test/jdk/javax/net/ssl/templates? Check SSLSocketTemplate.java which is using CountDownLatch.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have not! I'll take a look, thanks

Copy link
Member

@rhalade rhalade left a comment

Choose a reason for hiding this comment

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

Thanks for developing test for this change and updating it to use template.

@evwhelan
Copy link
Contributor Author

Thanks Rajan, I appreciate the guidance.

@evwhelan
Copy link
Contributor Author

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Feb 22, 2021
@openjdk
Copy link

openjdk bot commented Feb 22, 2021

@evwhelan
Your change (at version bc9d87d) is now ready to be sponsored by a Committer.

@rhalade
Copy link
Member

rhalade commented Feb 22, 2021

/sponsor

@openjdk openjdk bot closed this Feb 22, 2021
@openjdk openjdk bot added integrated Pull request has been integrated and removed sponsor Pull request is ready to be sponsored ready Pull request is ready to be integrated rfr Pull request is ready for review labels Feb 22, 2021
@openjdk
Copy link

openjdk bot commented Feb 22, 2021

@rhalade @evwhelan Since your change was applied there have been 296 commits pushed to the master branch:

  • 7b924d8: 8261973: Shenandoah: Cleanup/simplify root verifier
  • 63f8fc8: 8259662: Don't wrap SocketExceptions into SSLExceptions in SSLSocketImpl
  • cf0019d: 8259942: Enable customizations in CompileJavaModules.gmk and Main.gmk
  • a6a7e43: 8242032: G1 region remembered sets may contain non-coarse level PRTs for already coarsened regions
  • d7eebda: 8261391: ZGC crash - SEGV in RevokeOneBias::do_thread
  • 5b7b18c: 8259800: timeout in tck test testForkJoin(ForkJoinPool8Test)
  • 419717d: 8261803: Remove unused TaskTerminator in g1 full gc ref proc executor
  • 011f5a5: 8261799: Remove unnecessary cast in psParallelCompact.hpp
  • e9d7c07: 8248318: Remove superfluous use of boxing in ObjectStreamClass
  • 6b7575b: 8228748: Remove GCLocker::_doing_gc
  • ... and 286 more: https://git.openjdk.java.net/jdk/compare/aec037721cf8990c3f7c4364730812447e0811e1...master

Your commit was automatically rebased without conflicts.

Pushed as commit a867288.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integrated Pull request has been integrated security security-dev@openjdk.org
3 participants