'Check to see if PyCrypto is available, and convert key file path into a
key string if the key is in a file.
:param  subscription_id: Azure subscription ID.
:type   subscription_id: ``str``
:param  key_file: The PEM file used to authenticate with the service.
:type   key_file: ``str``'

def __init__(self, subscription_id, key_file, *args, **kwargs):

    super(AzureServiceManagementConnection, self).__init__(key_file, *args, **kwargs)
    self.subscription_id = subscription_id
    keypath = os.path.expanduser(key_file)
    self.keyfile = keypath
    is_file_path = (os.path.exists(keypath) and os.path.isfile(keypath))
    if (not is_file_path):
        raise InvalidCredsError('You    need    an    certificate    PEM    file    to    authenticate    with    Microsoft    Azure.    This    can    be    found    in    the    portal.')
    self.key_file = key_file
