NSS Tools cmsutil 编辑

Using cmsutil

Newsgroup: mozilla.dev.tech.crypto

The cmsutil command-line utility uses the S/MIME Toolkit to perform basic operations, such as encryption and decryption, on Cryptographic Message Syntax (CMS) messages.

Syntax

To run cmsutil, type the command cmsutiloption[arguments] where option and arguments are combinations of the options and arguments listed in the following section. Each command takes one option. Each option may take zero or more arguments. To see a usage string, issue the command without options.

Options and Arguments

Options specify an action. Option arguments modify an action. The options and arguments for the cmsutil command are defined as follows:

Options

-D

Decode a message.

-C

Encrypt a message.

-E

Envelope a message.

-O

Create a certificates-only message.

-S

Sign a message.

Arguments

-c content

Use this detached content (decode only).

-d dbdir

Specify the key/certificate database directory (default is ".")

-e envfile

Specify a file containing an enveloped message for a set of recipients to which you would like to send an encrypted message. If this is the first encrypted message for that set of recipients, a new enveloped message will be created that you can then use for future messages (encrypt only).

-G

Include a signing time attribute (sign only).

-h num

Generate email headers with info about CMS message (decode only).

-i infile

Use infile as a source of data (default is stdin).

-N nickname

Specify nickname of certificate to sign with (sign only).

-n

Suppress output of contents (decode only).

-o outfile

Use outfile as a destination of data (default is stdout).

-P

Include an S/MIME capabilities attribute.

-p password

Use password as key database password.

-r recipient1,recipient2, . . .Specify list of recipients (email addresses) for an encrypted or enveloped message. For certificates-only message, list of certificates to send.
-TSuppress content in CMS message (sign only).
-u certusageSet type of cert usage (default is <tt>certUsageEmailSigner)</tt>.
<-Y ekprefnickSpecify an encryption key preference by nickname.

Usage

cmsutil -C [-i infile] [-o outfile] [-d dbdir] [-p password] -r "recipient1,recipient2, . . ." -e envfile

cmsutil -D [-i infile] [-o outfile] [-d dbdir] [-p password] [-c content] [-n] [-h num]

cmsutil -E [-i infile] [-o outfile] [-d dbdir] [-p password] -r "recipient1,recipient2, . . ."

cmsutil -O [-i infile] [-o outfile] [-d dbdir] [-p password] -r "cert1,cert2, . . ."

cmsutil -S [-i infile] [-o outfile] [-d dbdir] [-p password] -N nickname[-TGP] [-Y ekprefnick]

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:80 次

字数:5576

最后编辑:6 年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文