Skip to main content

A python utils library

Project description

Python utils library and tools for certificate transparency.

Usage

As a tool:

> verify-scts --help

usage: verify-scts [-h] [--short | --debug]
                   [--cert-only | --tls-only | --ocsp-only]
                   hostname

positional arguments:
  hostname     host name of the server (example: 'ritter.vg')

optional arguments:
  -h, --help   show this help message and exit
  --short      show short result and warnings/errors only
  --debug      show more for diagnostic purposes
  --cert-only  only validate SCTs included in the certificate
  --tls-only   only validate SCTs gathered from TLS handshake
  --ocsp-only  only validate SCTs gathered via OCSP status request

Example:

verify-scts ritter.vg

verify-scts google.com --short

# Module entry points:
python -m ctutlz
python -m ctutlz.verify_scts

Import module in your python code:

import ctutlz

Installation

Install the latest version of the pypi python package ctutlz:

pip install ctutlz

Development

Clone the source code repository:

git clone https://github.com/theno/ctutlz.git

Run unit tests with pytest

pip install --user  pytest  utlz
PYTHONPATH=".:$PYTHONPATH"  python -m pytest

Run unit tests against several pythons with tox:

# install tox
pip install tox

# install and activate different python versions
fab setup.pyenv -H localhost
pyenv install  2.6.9  2.7.13  3.3.6  3.4.6  3.5.3  3.6.0
pyenv local  system  2.6.9  2.7.13  3.3.6  3.4.6  3.5.3  3.6.0

# build and run tests
python -m tox

Build and publish package:

# install pypandoc and twine
pip install  pypandoc  twine

# build package
python setup.py sdist

# upload to pypi.org
python -m twine  upload  dist/ctutlz-<VERSION>.tar.gz


# usefull oneliners
rm -rf .tox/; python3.6 -m tox
rm -rf dist/; python3.6 setup.py sdist; ls -hal dist/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ctutlz-0.1.0.tar.gz (9.8 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page