Skip to main content

Tool for cms signature

Project description

Introduce

This tool is used sign file with Cryptographic Message Syntax. And add a Timestamp Reply to the cms file optionally.

Installation

To install using pip,:

python -m pip install --upgrade pip
python -m pip install cmssign>=0.0.2

This tool depend on cryptographic and asn1crypto

Notice

The version 0.0.1 have some bug, it should not be used.

Use with GUI

cmssignui

Use within Command line

cmssign sign

Usage: cmssign sign [-h] --cafile CAFILE --cakey CAKEY [--tsca TSACA] [--tskey TSAKEY] --in INFILE [--out OUTFILE]
--signer

signer certificate file

--key

signer private key file

--tssigner

timestamp signer certificate file

--tskey

timestamp signer private key file

--timestamp

time stamp. use system time if not set. format must like ‘20220101’ or ‘20220101123000’

--in

file to sign

--out

specific the file to save the cms signature, if not set the “infile.cms” will be used

If the tssigner and tskey is set correctly, the timestamp reply will be add to the unsigned attributes section at the end of the cms file

cmssign combine

This command will add the timestamp reply to the unsigned attributes section at the end of the cms file

Usage: cmssign combine [-h] --cmsfile CMSFILE --tsfile TSFILE --out OUTFILE
--cmsfile

cms file

--tsfile

timestamp reply file

--out

specific the file to save the output

Example:

// Sign file with timestamp
cmssign sign --signer rootCA.crt --key rootCA.pem --tssigner tsa.crt --tskey tsa.pem --in file_go_sign --out output_cms_file

// Sign file without timestamp
cmssign sign --signer rootCA.crt --key rootCA.pem  --in file_go_sign --out output_cms_file

Currently the timestamp signer certificate and private key only support PEM format

Reference

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

cmssign-0.0.3-cp310-cp310-win_amd64.whl (1.3 MB view hashes)

Uploaded CPython 3.10 Windows x86-64

cmssign-0.0.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.5 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

cmssign-0.0.3-cp310-cp310-manylinux2014_aarch64.whl (1.4 MB view hashes)

Uploaded CPython 3.10

cmssign-0.0.3-cp39-cp39-win_amd64.whl (1.3 MB view hashes)

Uploaded CPython 3.9 Windows x86-64

cmssign-0.0.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.5 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

cmssign-0.0.3-cp39-cp39-manylinux2014_aarch64.whl (1.4 MB view hashes)

Uploaded CPython 3.9

cmssign-0.0.3-cp38-cp38-win_amd64.whl (1.3 MB view hashes)

Uploaded CPython 3.8 Windows x86-64

cmssign-0.0.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.5 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

cmssign-0.0.3-cp38-cp38-manylinux2014_aarch64.whl (1.4 MB view hashes)

Uploaded CPython 3.8

cmssign-0.0.3-cp37-cp37m-win_amd64.whl (1.3 MB view hashes)

Uploaded CPython 3.7m Windows x86-64

cmssign-0.0.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.5 MB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

cmssign-0.0.3-cp37-cp37m-manylinux2014_aarch64.whl (1.4 MB view hashes)

Uploaded CPython 3.7m

cmssign-0.0.3-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.5 MB view hashes)

Uploaded CPython 3.6m manylinux: glibc 2.17+ x86-64

cmssign-0.0.3-cp36-cp36m-manylinux2014_aarch64.whl (1.4 MB view hashes)

Uploaded CPython 3.6m

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