# 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/exception.py
# NO_URLS_MATCHED_PREFIX = 'No URLs matched'
# NO_URLS_MATCHED_GENERIC = (NO_URLS_MATCHED_PREFIX +
#                            '. Do the files you\'re operating on exist?')
# NO_URLS_MATCHED_TARGET = NO_URLS_MATCHED_PREFIX + ': %s'
# class AbortException(StandardError):
# class CommandException(StandardError):
# class ControlCException(Exception):
# class GcloudStorageTranslationError(Exception):
# class HashMismatchException(Exception):
# class IamChOnResourceWithConditionsException(Exception):
# class InvalidUrlError(Exception):
# class ExternalBinaryError(Exception):
#   def __init__(self, reason):
#   def __repr__(self):
#   def __str__(self):
#   def __init__(self, reason, informational=False):
#   def __repr__(self):
#   def __str__(self):
#   def __init__(self, message):
#   def __repr__(self):
#   def __str__(self):
#   def __init__(self, message):
#   def __repr__(self):
#   def __str__(self):
#   def __init__(self, message):
#   def __repr__(self):


import json
import os
import subprocess
import six
from unittest import mock
from gslib import context_config
from gslib import exception
from gslib.tests import testcase
from gslib.tests.testcase import base
from gslib.tests.util import SetBotoConfigForTest
from __future__ import unicode_literals




DEFAULT_CERT_PROVIDER_FILE_CONTENTS = {
    'cert_provider_command': [
        os.path.join('some', 'helper'), '--print_certificate'
    ]
}

DEFAULT_CERT_PROVIDER_FILE_CONTENTS_WITH_SPACE = {
    'cert_provider_command': ['some helper', '--print_certificate']
}

DEFAULT_CERT_PROVIDER_FILE_NO_COMMAND = {'foo': 'foo'}

CERT_SECTION = """-----BEGIN CERTIFICATE-----
LKJHLSDJKFHLEUIORWUYERWEHJHL
KLJHGFDLSJKH(@#*&$)@*#KJHFLKJDSFSD
-----END CERTIFICATE-----
"""
KEY_SECTION = """-----BEGIN ENCRYPTED PRIVATE KEY-----
LKJWE:RUWEORIU)(#*&$@(#$KJHLKDJHF(I*F@YLFHSLDKJFS
-----END ENCRYPTED PRIVATE KEY-----
"""
CERT_KEY_SECTION = CERT_SECTION + KEY_SECTION
PASSWORD = '##invalid-password##'
PASSWORD_SECTION = """
-----BEGIN PASSPHRASE-----

# 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/exception.py
# NO_URLS_MATCHED_PREFIX = 'No URLs matched'
# NO_URLS_MATCHED_GENERIC = (NO_URLS_MATCHED_PREFIX +
#                            '. Do the files you\'re operating on exist?')
# NO_URLS_MATCHED_TARGET = NO_URLS_MATCHED_PREFIX + ': %s'
# class AbortException(StandardError):
# class CommandException(StandardError):
# class ControlCException(Exception):
# class GcloudStorageTranslationError(Exception):
# class HashMismatchException(Exception):
# class IamChOnResourceWithConditionsException(Exception):
# class InvalidUrlError(Exception):
# class ExternalBinaryError(Exception):
#   def __init__(self, reason):
#   def __repr__(self):
#   def __str__(self):
#   def __init__(self, reason, informational=False):
#   def __repr__(self):
#   def __str__(self):
#   def __init__(self, message):
#   def __repr__(self):
#   def __str__(self):
#   def __init__(self, message):
#   def __repr__(self):
#   def __str__(self):
#   def __init__(self, message):
#   def __repr__(self):


# Path: gslib/tests/test_context_config.py
import json
import os
import subprocess
import six
from unittest import mock
from gslib import context_config
from gslib import exception
from gslib.tests import testcase
from gslib.tests.testcase import base
from gslib.tests.util import SetBotoConfigForTest

from __future__ import unicode_literals




DEFAULT_CERT_PROVIDER_FILE_CONTENTS = {
    'cert_provider_command': [
        os.path.join('some', 'helper'), '--print_certificate'
    ]
}

DEFAULT_CERT_PROVIDER_FILE_CONTENTS_WITH_SPACE = {
    'cert_provider_command': ['some helper', '--print_certificate']
}

DEFAULT_CERT_PROVIDER_FILE_NO_COMMAND = {'foo': 'foo'}

CERT_SECTION = """-----BEGIN CERTIFICATE-----
LKJHLSDJKFHLEUIORWUYERWEHJHL
KLJHGFDLSJKH(@#*&$)@*#KJHFLKJDSFSD
-----END CERTIFICATE-----
"""
KEY_SECTION = """-----BEGIN ENCRYPTED PRIVATE KEY-----
LKJWE:RUWEORIU)(#*&$@(#$KJHLKDJHF(I*F@YLFHSLDKJFS
-----END ENCRYPTED PRIVATE KEY-----
"""
CERT_KEY_SECTION = CERT_SECTION + KEY_SECTION
PASSWORD = '##invalid-password##'
PASSWORD_SECTION = """
-----BEGIN PASSPHRASE-----

%s