| #!/usr/bin/env python3 |
| |
| import errno |
| import os |
| import sys |
| |
| locations = [ '/etc/pki/tls/certs/ca-bundle.crt', |
| '/etc/ssl/certs/ca-certificates.crt', |
| '/etc/ssl/ca-bundle.pem' |
| ] |
| |
| if len(sys.argv) > 1: |
| locations.insert(0, sys.argv[1]) |
| |
| for location in locations: |
| if os.path.isfile(location): |
| sys.stdout.write(location) |
| sys.exit(0) |
| |
| sys.exit(errno.ENOENT) |