Skip to content

Commit

Permalink
8312383: Log X509ExtendedKeyManager implementation class name in TLS/…
Browse files Browse the repository at this point in the history
…SSL connection

Reviewed-by: coffeys
  • Loading branch information
Prajwal Kumaraswamy authored and coffeys committed Mar 8, 2024
1 parent fb4610e commit bdd1aeb
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -201,6 +201,10 @@ public static SSLPossession createPossession(
private static SSLPossession createClientPossession(
ClientHandshakeContext chc, String[] keyTypes) {
X509ExtendedKeyManager km = chc.sslContext.getX509KeyManager();
if (SSLLogger.isOn && SSLLogger.isOn("ssl")) {
SSLLogger.finest("X509KeyManager class: " +
km.getClass().getName());
}
String clientAlias = null;
if (chc.conContext.transport instanceof SSLSocketImpl socket) {
clientAlias = km.chooseClientAlias(
Expand Down Expand Up @@ -270,6 +274,10 @@ private static SSLPossession createClientPossession(
private static SSLPossession createServerPossession(
ServerHandshakeContext shc, String[] keyTypes) {
X509ExtendedKeyManager km = shc.sslContext.getX509KeyManager();
if (SSLLogger.isOn && SSLLogger.isOn("ssl")) {
SSLLogger.finest("X509KeyManager class: " +
km.getClass().getName());
}
String serverAlias = null;
for (String keyType : keyTypes) {
if (shc.conContext.transport instanceof SSLSocketImpl socket) {
Expand Down

7 comments on commit bdd1aeb

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

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

@luchenlin
Copy link

Choose a reason for hiding this comment

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

/backport jdk21u-dev

@luchenlin
Copy link

Choose a reason for hiding this comment

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

/backport jdk17u-dev

@openjdk
Copy link

@openjdk openjdk bot commented on bdd1aeb Mar 18, 2024

Choose a reason for hiding this comment

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

@luchenlin the backport was successfully created on the branch backport-luchenlin-bdd1aebe in my personal fork of openjdk/jdk21u-dev. To create a pull request with this backport targeting openjdk/jdk21u-dev:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit bdd1aebe from the openjdk/jdk repository.

The commit being backported was authored by Prajwal Kumaraswamy on 8 Mar 2024 and was reviewed by Sean Coffey.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk21u-dev:

$ git fetch https://github.com/openjdk-bots/jdk21u-dev.git backport-luchenlin-bdd1aebe:backport-luchenlin-bdd1aebe
$ git checkout backport-luchenlin-bdd1aebe
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk21u-dev.git backport-luchenlin-bdd1aebe

@openjdk
Copy link

@openjdk openjdk bot commented on bdd1aeb Mar 18, 2024

Choose a reason for hiding this comment

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

@luchenlin Could not automatically backport bdd1aebe to openjdk/jdk17u-dev due to conflicts in the following files:

  • src/java.base/share/classes/sun/security/ssl/X509Authentication.java

Please fetch the appropriate branch/commit and manually resolve these conflicts by using the following commands in your personal fork of openjdk/jdk17u-dev. Note: these commands are just some suggestions and you can use other equivalent commands you know.

# Fetch the up-to-date version of the target branch
$ git fetch --no-tags https://git.openjdk.org/jdk17u-dev.git master:master

# Check out the target branch and create your own branch to backport
$ git checkout master
$ git checkout -b backport-luchenlin-bdd1aebe

# Fetch the commit you want to backport
$ git fetch --no-tags https://git.openjdk.org/jdk.git bdd1aebea379b63ae405827074530ef8e8a7c239

# Backport the commit
$ git cherry-pick --no-commit bdd1aebea379b63ae405827074530ef8e8a7c239
# Resolve conflicts now

# Commit the files you have modified
$ git add files/with/resolved/conflicts
$ git commit -m 'Backport bdd1aebea379b63ae405827074530ef8e8a7c239'

Once you have resolved the conflicts as explained above continue with creating a pull request towards the openjdk/jdk17u-dev with the title Backport bdd1aebea379b63ae405827074530ef8e8a7c239.

Below you can find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit bdd1aebe from the openjdk/jdk repository.

The commit being backported was authored by Prajwal Kumaraswamy on 8 Mar 2024 and was reviewed by Sean Coffey.

Thanks!

@luchenlin
Copy link

Choose a reason for hiding this comment

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

/backport jdk11u-dev

@openjdk
Copy link

@openjdk openjdk bot commented on bdd1aeb Mar 18, 2024

Choose a reason for hiding this comment

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

@luchenlin Could not automatically backport bdd1aebe to openjdk/jdk11u-dev due to conflicts in the following files:

  • src/java.base/share/classes/sun/security/ssl/X509Authentication.java

Please fetch the appropriate branch/commit and manually resolve these conflicts by using the following commands in your personal fork of openjdk/jdk11u-dev. Note: these commands are just some suggestions and you can use other equivalent commands you know.

# Fetch the up-to-date version of the target branch
$ git fetch --no-tags https://git.openjdk.org/jdk11u-dev.git master:master

# Check out the target branch and create your own branch to backport
$ git checkout master
$ git checkout -b backport-luchenlin-bdd1aebe

# Fetch the commit you want to backport
$ git fetch --no-tags https://git.openjdk.org/jdk.git bdd1aebea379b63ae405827074530ef8e8a7c239

# Backport the commit
$ git cherry-pick --no-commit bdd1aebea379b63ae405827074530ef8e8a7c239
# Resolve conflicts now

# Commit the files you have modified
$ git add files/with/resolved/conflicts
$ git commit -m 'Backport bdd1aebea379b63ae405827074530ef8e8a7c239'

Once you have resolved the conflicts as explained above continue with creating a pull request towards the openjdk/jdk11u-dev with the title Backport bdd1aebea379b63ae405827074530ef8e8a7c239.

Below you can find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit bdd1aebe from the openjdk/jdk repository.

The commit being backported was authored by Prajwal Kumaraswamy on 8 Mar 2024 and was reviewed by Sean Coffey.

Thanks!

Please sign in to comment.