Skip to main content

x5092json Utility

Project description

x5092json

Provides a parser and JSON serializer for x509 certificates.

This tool can be used to creating a large database of analyzed certificates. Provides a command-line tool as well as an importable module. Over 400 Million certificates parsed so far.

Motivation

PyCA-Cryptography (https://github.com/pyca/cryptography) provides a full set of cryptographic operations for Python programmers, but the focus of that library is on safety and correctness. For that reason, many certificates which one finds "in the wild" are not intializable as cryptography objects out-of-the-box. The x5092json package takes the safety belts off of cyrptography to provide a parser which is robust to the nonsense which one finds when processing the X509 certificates deployed in the wilds of the Internet.

Installation

Requires Python3. Tested against Python3.5, 3.6, 3.7. May work against earlier Py3Ks.

From PyPI:

$ pip3 install x5092json

From source :

$ git clone https://github.com/jcrowgey/x5092json

Usage

Can be used as a command line tool:

$ cat mycert.pem | x5092json

For example, the above invocation teads a PEM formatted x509 Certificate from STDIN by default, the JSON document is printed on STDOUT.

Can also be imported as a module within a python program.

import x5092json

# load a pem file from the filesystem
f = open('mycert.pem')
cert = x5092json.load_certificate(f)
x5092json.parse(cert)

See the manual for more usage examples and options.

Author

Joshua Crowgey

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

x5092json-1.0.2.tar.gz (12.5 kB view details)

Uploaded Source

File details

Details for the file x5092json-1.0.2.tar.gz.

File metadata

  • Download URL: x5092json-1.0.2.tar.gz
  • Upload date:
  • Size: 12.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.5.3

File hashes

Hashes for x5092json-1.0.2.tar.gz
Algorithm Hash digest
SHA256 3300804f58d904481d1707cfadeeb075e953e65ad1468deeecb9106c8e991ed6
MD5 f1599488c557ac7c93ab2437d47a49b6
BLAKE2b-256 5817370f1d7be06db3645ab5f2a308ebaca12c385404cd4a8fc3d1710c00796b

See more details on using hashes here.

Supported by

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