Skip to content

Commit

Permalink
Merge pull request #2756 from dlm6693/common-name-fixes
Browse files Browse the repository at this point in the history
Don't raise warning if common name and hostname are the same
  • Loading branch information
dlm6693 authored Sep 7, 2022
2 parents 5b799da + 720da81 commit 73ce827
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion botocore/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,11 @@ def _create_endpoint(
is_disabled = ensure_boolean(
os.environ.get('BOTO_DISABLE_COMMONNAME', False)
)
if not is_disabled and sslCommonName is not None:
if (
not is_disabled
and sslCommonName is not None
and sslCommonName != hostname
):
warnings.warn(
f'The {service_name} client is currently using a '
f'deprecated endpoint: {sslCommonName}. In the next '
Expand Down

0 comments on commit 73ce827

Please sign in to comment.