# Path: gslib/utils/boto_util.py
# BOTO_IS_SECURE = config.get('Boto', 'is_secure', True)
# CERTIFICATE_VALIDATION_ENABLED = config.get('Boto',
#                                             'https_validate_certificates', True)
# def ConfigureCertsFile():
# def ConfigureNoOpAuthIfNeeded():
# def GetCertsFile():
# def GetCleanupFiles():
# def GetConfigFilePaths():
# def GetFriendlyConfigFilePaths():
# def GetGsutilStateDir():
# def GetCredentialStoreFilename():
# def GetGceCredentialCacheFilename():
# def GetGcsJsonApiVersion():
# def GetJsonResumableChunkSize():
# def GetLastCheckedForGsutilUpdateTimestampFile():
# def GetMaxConcurrentCompressedUploads():
# def GetMaxRetryDelay():
# def GetMaxUploadCompressionBufferSize():
# def GetNewHttp(http_class=httplib2.Http, **kwargs):
# def GetNumRetries():
# def GetTabCompletionLogFilename():
# def GetTabCompletionCacheFilename():
# def HasConfiguredCredentials():
# def JsonResumableChunkSizeDefined():
# def MonkeyPatchBoto():
#   def _PatchedGetPluginMethod(cls, requested_capability=None):
#   def _PatchedConnectMethod(self):
# def ProxyInfoFromEnvironmentVar(proxy_env_var):
# def ResumableThreshold():
# def SetProxyInfo(boto_proxy_config):
# def UsingCrcmodExtension():
# def _PatchedShouldRetryMethod(self, response, chunked_transfer=False):
# def HasUserSpecifiedGsHost():
# 
# Path: gslib/context_config.py
# _DEFAULT_METADATA_PATH = os.path.expanduser(
#     os.path.join('~', '.secureConnect', 'context_aware_metadata.json'))
# _CERT_PROVIDER_COMMAND = "cert_provider_command"
# _CERT_PROVIDER_COMMAND_PASSPHRASE_OPTION = "--with_passphrase"
# class CertProvisionError(Exception):
# class ContextConfigSingletonAlreadyExistsError(Exception):
# class _ContextConfig(object):
# def _is_pem_section_marker(line):
# def _split_pem_into_sections(contents, logger):
# def _check_path():
# def _read_metadata_file(metadata_path):
# def _default_command():
#   def __init__(self, logger):
#   def _provision_client_cert(self, cert_path):
#   def _unprovision_client_cert(self):
# def create_context_config(logger):
# def get_context_config():


import boto.auth
from gslib import cloud_api
from gslib.utils import boto_util
from gslib import context_config
from gslib.tests import testcase
from gslib.tests.testcase import base
from gslib.tests.util import SetBotoConfigForTest
from gslib.tests.util import unittest
from six import add_move, MovedModule
from six.moves import mock
        domain='',
        password='password',
    )

  @mock.patch.object(boto.auth, 'get_auth_handler', return_value=None)
  def testHasConfiguredCredentialsNoCreds(self, _):
    with SetBotoConfigForTest([
        ('Credentials', 'gs_access_key_id', None),
        ('Credentials', 'gs_secret_access_key', None),
        ('Credentials', 'aws_access_key_id', None),
        ('Credentials', 'aws_secret_access_key', None),
        ('Credentials', 'gs_oauth2_refresh_token', None),
        ('Credentials', 'gs_external_account_file', None),
        ('Credentials', 'gs_service_client_id', None),
        ('Credentials', 'gs_service_key_file', None),
    ]):
      self.assertFalse(boto_util.HasConfiguredCredentials())

  @mock.patch.object(boto.auth, 'get_auth_handler', return_value=None)
  def testHasConfiguredCredentialsGoogCreds(self, _):
    with SetBotoConfigForTest([
        ('Credentials', 'gs_access_key_id', "?????"),
        ('Credentials', 'gs_secret_access_key', "?????"),
        ('Credentials', 'aws_access_key_id', None),
        ('Credentials', 'aws_secret_access_key', None),
        ('Credentials', 'gs_oauth2_refresh_token', None),
        ('Credentials', 'gs_external_account_file', None),
        ('Credentials', 'gs_service_client_id', None),
        ('Credentials', 'gs_service_key_file', None),
    ]):

# Path: gslib/utils/boto_util.py
# BOTO_IS_SECURE = config.get('Boto', 'is_secure', True)
# CERTIFICATE_VALIDATION_ENABLED = config.get('Boto',
#                                             'https_validate_certificates', True)
# def ConfigureCertsFile():
# def ConfigureNoOpAuthIfNeeded():
# def GetCertsFile():
# def GetCleanupFiles():
# def GetConfigFilePaths():
# def GetFriendlyConfigFilePaths():
# def GetGsutilStateDir():
# def GetCredentialStoreFilename():
# def GetGceCredentialCacheFilename():
# def GetGcsJsonApiVersion():
# def GetJsonResumableChunkSize():
# def GetLastCheckedForGsutilUpdateTimestampFile():
# def GetMaxConcurrentCompressedUploads():
# def GetMaxRetryDelay():
# def GetMaxUploadCompressionBufferSize():
# def GetNewHttp(http_class=httplib2.Http, **kwargs):
# def GetNumRetries():
# def GetTabCompletionLogFilename():
# def GetTabCompletionCacheFilename():
# def HasConfiguredCredentials():
# def JsonResumableChunkSizeDefined():
# def MonkeyPatchBoto():
#   def _PatchedGetPluginMethod(cls, requested_capability=None):
#   def _PatchedConnectMethod(self):
# def ProxyInfoFromEnvironmentVar(proxy_env_var):
# def ResumableThreshold():
# def SetProxyInfo(boto_proxy_config):
# def UsingCrcmodExtension():
# def _PatchedShouldRetryMethod(self, response, chunked_transfer=False):
# def HasUserSpecifiedGsHost():
# 
# Path: gslib/context_config.py
# _DEFAULT_METADATA_PATH = os.path.expanduser(
#     os.path.join('~', '.secureConnect', 'context_aware_metadata.json'))
# _CERT_PROVIDER_COMMAND = "cert_provider_command"
# _CERT_PROVIDER_COMMAND_PASSPHRASE_OPTION = "--with_passphrase"
# class CertProvisionError(Exception):
# class ContextConfigSingletonAlreadyExistsError(Exception):
# class _ContextConfig(object):
# def _is_pem_section_marker(line):
# def _split_pem_into_sections(contents, logger):
# def _check_path():
# def _read_metadata_file(metadata_path):
# def _default_command():
#   def __init__(self, logger):
#   def _provision_client_cert(self, cert_path):
#   def _unprovision_client_cert(self):
# def create_context_config(logger):
# def get_context_config():


# Path: gslib/tests/test_boto_util.py
import boto.auth
from gslib import cloud_api
from gslib.utils import boto_util
from gslib import context_config
from gslib.tests import testcase
from gslib.tests.testcase import base
from gslib.tests.util import SetBotoConfigForTest
from gslib.tests.util import unittest
from six import add_move, MovedModule
from six.moves import mock

        domain='',
        password='password',
    )

  @mock.patch.object(boto.auth, 'get_auth_handler', return_value=None)
  def testHasConfiguredCredentialsNoCreds(self, _):
    with SetBotoConfigForTest([
        ('Credentials', 'gs_access_key_id', None),
        ('Credentials', 'gs_secret_access_key', None),
        ('Credentials', 'aws_access_key_id', None),
        ('Credentials', 'aws_secret_access_key', None),
        ('Credentials', 'gs_oauth2_refresh_token', None),
        ('Credentials', 'gs_external_account_file', None),
        ('Credentials', 'gs_service_client_id', None),
        ('Credentials', 'gs_service_key_file', None),
    ]):
      self.assertFalse(boto_util.HasConfiguredCredentials())

  @mock.patch.object(boto.auth, 'get_auth_handler', return_value=None)
  def testHasConfiguredCredentialsGoogCreds(self, _):
    with SetBotoConfigForTest([
        ('Credentials', 'gs_access_key_id', "?????"),
        ('Credentials', 'gs_secret_access_key', "?????"),
        ('Credentials', 'aws_access_key_id', None),
        ('Credentials', 'aws_secret_access_key', None),
        ('Credentials', 'gs_oauth2_refresh_token', None),
        ('Credentials', 'gs_external_account_file', None),
        ('Credentials', 'gs_service_client_id', None),
        ('Credentials', 'gs_service_key_file', None),
    ]):

      self.assertTrue(boto_util.HasConfiguredCredentials())