summaryrefslogtreecommitdiff
path: root/src/leap/util/certs.py
blob: f0f790e95168e76b3225cf0a5cf7a8d10ae7f96d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import os
import logging

logger = logging.getLogger(__name__)


def get_mac_cabundle():
    # hackaround bundle error
    # XXX this needs a better fix!
    f = os.path.split(__file__)[0]
    sep = os.path.sep
    f_ = sep.join(f.split(sep)[:-2])
    verify = os.path.join(f_, 'cacert.pem')
    #logger.error('VERIFY PATH = %s' % verify)
    exists = os.path.isfile(verify)
    #logger.error('do exist? %s', exists)
    if exists:
        return verify