Command line script - cryptography operations (mostly for UA) Usage (shut down server before usage): ubcli crypt --help
Methods
# buildFullPath (fn: string) → string inner
For relative path transform it to absolute relative to cwd
Arguments:
fn
: string
# certParse (certOrFolderPath: string) inner
Parse certificate(s)
Arguments:
certOrFolderPath
: string
# combine (dataFn: string, signatureFn: string) inner
Combine data and signature(s) into one container
# ensueFolder (folderPath: string) → string inner
Create absolute folder path and force to create it
Return:
absolute folder path
Arguments:
folderPath
: string
# enumDev () inner
Display JSON with available key medias and devices
# hash (dataFn: string, algoopt: string) inner
# showUsage () inner
Display usage
# sign (fileName4Sign: string, signFormat: string) inner
Create detached signature for file. [-k privateKeyPath] [-p privateKeyPwd | -i] [-o signatureFn] [-kn additionalKeyName]
- if "-k privateKeyPath" is not specified - use key from "ubConfig.security.dstu.iit.keyPath"
- if "-p privateKeyPwd" is not specified - use password from "ubConfig.security.dstu.iit.password",
- "-i" is specified - ask for password form stdin
- "signFormat" can be one of "CAdES", "XAdES"
- "-o signatureFn" is a result file name, if not specified - output result to stdin
# signAsic (fileName4Sign: string, signFormat: string) inner
Create ASiC-E-signFormat (ASiC-E-CAdES or ASiC-E-XAdES) container for file(s) (; separated).
- if "-k privateKeyPath" is not specified - use key from "ubConfig.security.dstu.iit.keyPath"
- if "-p privateKeyPwd" is not specified - use password from "ubConfig.security.dstu.iit.password",
- "-i" is specified - ask for password form stdin
- "signFormat" can be one of "CAdES", "XAdES"
- "-o signatureFn" is a result file name, if not specified - output result to first fileName4Sign folder in firstFileName4Sign.asice
# split (containerFn: string, destFolder: string) inner
Split any container (with one data file) into data file and signatures
# verify (signFn: string, dataFnopt: string) inner
Verify signature