Skip to content

Commit 965c920

Browse files
committed
ssl
1 parent 2d378ad commit 965c920

File tree

4 files changed

+0
-27
lines changed

4 files changed

+0
-27
lines changed

src/azure-cli-core/azure/cli/core/util.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1164,12 +1164,6 @@ def __exit__(self, exc_type, exc_val, exc_tb):
11641164

11651165

11661166
def _ssl_context():
1167-
if sys.version_info < (3, 4) or (in_cloud_console() and platform.system() == 'Windows'):
1168-
try:
1169-
return ssl.SSLContext(ssl.PROTOCOL_TLS) # added in python 2.7.13 and 3.6
1170-
except AttributeError:
1171-
return ssl.SSLContext(ssl.PROTOCOL_TLSv1)
1172-
11731167
return ssl.create_default_context()
11741168

11751169

src/azure-cli/azure/cli/command_modules/acr/helm.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -366,15 +366,7 @@ def _get_helm_package_name(client_version):
366366

367367

368368
def _ssl_context():
369-
import sys
370369
import ssl
371-
372-
if sys.version_info < (3, 4) or (in_cloud_console() and platform.system() == 'Windows'):
373-
try:
374-
return ssl.SSLContext(ssl.PROTOCOL_TLS) # added in python 2.7.13 and 3.6
375-
except AttributeError:
376-
return ssl.SSLContext(ssl.PROTOCOL_TLSv1)
377-
378370
return ssl.create_default_context()
379371

380372

src/azure-cli/azure/cli/command_modules/acs/custom.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2218,13 +2218,6 @@ def k8s_install_kubelogin(cmd, client_version='latest', install_location=None, s
22182218

22192219

22202220
def _ssl_context():
2221-
if sys.version_info < (3, 4) or (in_cloud_console() and platform.system() == 'Windows'):
2222-
try:
2223-
# added in python 2.7.13 and 3.6
2224-
return ssl.SSLContext(ssl.PROTOCOL_TLS)
2225-
except AttributeError:
2226-
return ssl.SSLContext(ssl.PROTOCOL_TLSv1)
2227-
22282221
return ssl.create_default_context()
22292222

22302223

src/azure-cli/azure/cli/command_modules/appservice/custom.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2676,12 +2676,6 @@ def _redact_storage_accounts(properties):
26762676

26772677

26782678
def _ssl_context():
2679-
if sys.version_info < (3, 4) or (in_cloud_console() and sys.platform.system() == 'Windows'):
2680-
try:
2681-
return ssl.SSLContext(ssl.PROTOCOL_TLS) # added in python 2.7.13 and 3.6
2682-
except AttributeError:
2683-
return ssl.SSLContext(ssl.PROTOCOL_TLSv1)
2684-
26852679
return ssl.create_default_context()
26862680

26872681

0 commit comments

Comments
 (0)