Home Applications iris-pkcs7-util

iris-pkcs7-util

This application is not supported by InterSystems Corporation. Please be notified that you use it at your own risk.
3.5
1 reviews
0
Awards
88
Views
7
IPM installs
2
1
Details
Releases
Reviews
Issues
Pull requests
An util to create CMS/pkcs7 object

What's new in this version

Initial Release

iris-pkcs7-utils

This is a set of utilities for working with PKCS#7 files. It is based on the python libraries asn1crypto and pyopenssl.

This utility is intended to be used with IRIS and IRIS for Heath from an COS environment.

It’s distributed on ZPM/IPM.

Installation

zpm "install pkcs7-utils"

with pip :

pip install https://github.com/grongierisc/iris-pkcs7-util/releases/download/v0.0.1/iris_gen_cms-0.0.1-py3-none-any.whl

Usage

    set tUtils = ##class(dc.cms.Utils).%New()
    set tCertFileName = "cert.pem"
    set tKeyFileName = "key.pem"
    set tPassPhrase = "TOTO"
    set tContent = ##class(%Stream.FileCharacter).%New()
    $$$ThrowOnError(tContent.LinkToFile("content.txt"))
$$$ThrowOnError(tUtils.CreateCMSStream(tContent,tCertFileName, tKeyFileName, tPassPhrase, .tStream))
zwrite tStream

Command line

gencms -h

result:

usage: gencms [-h] content_filename cert_filename key_filename key_password output_filename

Generate a CMS file

positional arguments:
content_filename the file to sign
cert_filename the certificate to use
key_filename the private key to use
key_password the private key password
output_filename the output CMS file

optional arguments:
-h, --help show this help message and exit

example:

gencms misc/in/NORMEDRE_300356-840001861_20181_25-1_20190326175624.txt misc/cert/asip-p12-EL-TEST-ORG-SIGN-20200702-170758.crt.pem misc/key/asip-p12-EL-TEST-ORG-SIGN-20200702-170758.key.pem toto misc/out/toto.cms
Read more
Made with
Install
zpm install pkcs7-utils download archive
Version
1.0.230 May, 2023
ObjectScript quality test
Category
Technology Example
Works with
InterSystems IRISInterSystems IRIS for Health
First published
30 May, 2023
Last checked by moderator
27 Jun, 2023Works