Skip to main content

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. Because this package relies on pyOpenSSL, which relies on libssl C bindings, your system will need to be able to build a wheel. That, in turn, may require such header files as <openssl/opensslv.h> and <pyconfig.h>. See your distribution's package manager for these dependencies (or, in the future, I may be able to push out a pre-compiled package for some systems)---file an issue if you are interested in this.

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 reads 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.

from x5092json import x509parser

# load a pem file from the filesystem
f = open('mycert.pem', mode='rb')
cert = x509parser.load_certificate(f)
x509parser.parse(cert)

See the manual for more usage examples and options.

Author

Joshua Crowgey

Metadata

Release files for x5092json 1.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for x5092json 1.0.3
File Size Uploaded
x5092json-1.0.3.tar.gz 13.0 kB Details

Release files / x5092json-1.0.3.tar.gz

Download URL x5092json-1.0.3.tar.gz
Size 13.0 kB
Tags Source
SHA-256 checksum
How to use checksums
f3c74d9f6e3b8ee3fde0baa4157de85cc8004cd6c3b4dc0fd1dddacbccef9c61
BLAKE2b-256 checksum
How to use checksums
6cd078347ac3397a1b7efb4e9650d38ee2e16e0130ae87212ff289bc919a2c36
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.4.2 requests/2.19.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.8

Release history Release notifications | RSS feed

This release

1.0.3 This release

1 release file

1.0.2

1 release file

1.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page