2014-10-14 04:24:01 +00:00
|
|
|
#!/usr/bin/env python
|
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
|
|
|
"""
|
|
|
|
certifi.py
|
|
|
|
~~~~~~~~~~
|
|
|
|
|
|
|
|
This module returns the installation location of cacert.pem.
|
|
|
|
"""
|
|
|
|
import os
|
2015-12-23 02:57:53 +00:00
|
|
|
import warnings
|
|
|
|
|
|
|
|
|
|
|
|
class DeprecatedBundleWarning(DeprecationWarning):
|
|
|
|
"""
|
|
|
|
The weak security bundle is being deprecated. Please bother your service
|
|
|
|
provider to get them to stop using cross-signed roots.
|
|
|
|
"""
|
|
|
|
|
2014-10-14 04:24:01 +00:00
|
|
|
|
|
|
|
def where():
|
|
|
|
f = os.path.split(__file__)[0]
|
|
|
|
|
|
|
|
return os.path.join(f, 'cacert.pem')
|
|
|
|
|
2015-12-23 02:57:53 +00:00
|
|
|
|
|
|
|
def old_where():
|
|
|
|
warnings.warn(
|
|
|
|
"The weak security bundle is being deprecated.",
|
|
|
|
DeprecatedBundleWarning
|
|
|
|
)
|
|
|
|
f = os.path.split(__file__)[0]
|
|
|
|
return os.path.join(f, 'weak.pem')
|
|
|
|
|
2014-10-14 04:24:01 +00:00
|
|
|
if __name__ == '__main__':
|
|
|
|
print(where())
|