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
Cryptographic Message Syntax https://www.rfc-editor.org/rfc/rfc5652.html
Time-Stamp Protocol https://www.rfc-editor.org/rfc/rfc3161.txt
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Hashes for cmssign-0.0.3-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d1a7cb010d8cf4e6c310f1e2be98a53cdbdabc3a5848b38c00e68ab9c2b716c9 |
|
MD5 | 408ec5b8176e6dfc9efcc2bad05b4a06 |
|
BLAKE2b-256 | 65b68106583d15ec697a75459cbe4541c3db7995ff64693aa3864c363ad84abe |
Hashes for cmssign-0.0.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fcb613e2afca2618d11167e2a48cb2d750c8650cc0512547f75175047a835892 |
|
MD5 | 89c22e094df1597d90126baf7d39bed8 |
|
BLAKE2b-256 | 6821ae597b605d9147514382e5c6f24b4a6b0bb2b36d77add145b93fee43c375 |
Hashes for cmssign-0.0.3-cp310-cp310-manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 496f58c9fe20a89039166818114997d0f000b3e1d471cbd331b393bcaee4e9c3 |
|
MD5 | 38c02ec4a1a0ffd0da949b262c54b13e |
|
BLAKE2b-256 | 35927f054d7590896b18dfec8f5a16e2bbb222be17473db20d8f545e1fa1994b |
Hashes for cmssign-0.0.3-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c92ef2a8d30bac8a12659c3888fabb8ad10fa73b01db0c46e584f5274b205b0e |
|
MD5 | d6abb87acee904baee5ee62c2a63c27d |
|
BLAKE2b-256 | 7ba2667dcab3d40425c5092d0fbc9257100481ab5deeb8a22bd113b609efd0a6 |
Hashes for cmssign-0.0.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d395e5cd7fd7315e8b4afa2fca79c246869b741b59504c216b9ff837a6fb790e |
|
MD5 | 9444926c8f1b9d4c30883a9ac9bb032e |
|
BLAKE2b-256 | 52a368c754dfc4ab280707682d308b92f23df7a5f399bce009348f77a1fba1df |
Hashes for cmssign-0.0.3-cp39-cp39-manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96bcd26401e0f28a46f0a2b0b106afae5772ad0a3967ad1a43fc38a4efaef6dd |
|
MD5 | 2ab4a65e61b6e0d25458371ad6b9de31 |
|
BLAKE2b-256 | 1862f8afc6208bdd8146fe5c7535761acbc48be53cb7c66b3e4476587f96de3b |
Hashes for cmssign-0.0.3-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb7d7d5e2b7a3a90c97c2cf92bd49c61dff871e091b66b95f540b37e91fa1ce4 |
|
MD5 | 4ac6061b3dca20672b641781c3271a91 |
|
BLAKE2b-256 | 8a3bddefafea1cb91723501a3247034bb6fc7455aa75c84e3daf6fd4bcc7e2da |
Hashes for cmssign-0.0.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed0938c6cda8eaa3a5731e2b063186ed0732d277c4140d6ab1c19c180a84647e |
|
MD5 | 33ccb81d877802c794481bb78911be65 |
|
BLAKE2b-256 | c76f0a60f99a0052f9ffb7d0faa55c514ae4488a4ee85f2b183ebed307127401 |
Hashes for cmssign-0.0.3-cp38-cp38-manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 19f57ebc9c9a352f228351a76a0377077cf5ff07e9888b4917d16603aba5e011 |
|
MD5 | 6eb1349dbf3f338a086873f25d033904 |
|
BLAKE2b-256 | 1267224447584fc246bc9952117b7aab6421c6dc83667a6e50f705162cd028ec |
Hashes for cmssign-0.0.3-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c16b2156b1164aac25778cb08f8ae062f1fd2402454fa81109b4c8d5596d9875 |
|
MD5 | 35e6ad8ca3e8cad1d311d9677bcd43c0 |
|
BLAKE2b-256 | a4bf06b76649492e78454e85a776b7d1d3342b3bda4fcb8571b152b3480223f4 |
Hashes for cmssign-0.0.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9904d466169179baa526791a92e8f044b2136900ddbec763bd6731067cb4d61e |
|
MD5 | 55778bbebc6d4172773be9e0da71e995 |
|
BLAKE2b-256 | e800cd06d5b8a5a2bf81e1c0dd44b0afd5ebc785b5e709246ffa17a474088f98 |
Hashes for cmssign-0.0.3-cp37-cp37m-manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f07afdf9a34474e8f8f7d69f9fc7771d24a80f74ff70ee040d8910f851344d6f |
|
MD5 | 5217195fb79fab84dd0ba01e5adca235 |
|
BLAKE2b-256 | e0dd9b9ffbc8142438f539a2ba8b9c43c2afdc13d4f48d0d0799ad23b526871e |
Hashes for cmssign-0.0.3-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 43652ee8d4899c340cf01ce3dd4b325f9d41c2b2433f41a1818cafc881d0ef60 |
|
MD5 | fdfd9f1cc9778703f95ef05fe4549f3a |
|
BLAKE2b-256 | 9d53fffa968b041b39aee4a21f691a0c3d91c8847c0aee7ef0dd8cae8b421ea2 |
Hashes for cmssign-0.0.3-cp36-cp36m-manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6bae266e664a71be8674550cb80d198142f05695b1617918306828d3c2a75f0a |
|
MD5 | e607ed78d22ca4aec5ff820788c26212 |
|
BLAKE2b-256 | 7b9098ed3e04c3db4e3954c9a912bb37b4ef71e613b949323fcef2cee10d280c |