Craig Dunigan wrote:

> Thanks David, but initially I couldn't even get far enough to make
> pk12util complain about nicknames.  It simply wouldn't do anything but
> return the usage message, which I assume means, like in other *nix
> commands, that I have the syntax wrong.

Yup.

> On the chance that pk12util does not follow POSIX standard and is
> sensitive to the order of command line options, I tried re-ordering
> the options exactly following the usage message.  That seems to work,
> or, at least, pk12util complained about the nickname.

Hmmm. I tried pk12util commands with the options in the reverse of the
order shown in the usage, and they all worked.  So I don't think order
was the issue.

Some common things that cause command line parsing errors include:
a) not putting the space between the option letter and the option argument,
   e.g. "-dcertdir" instead of "-d certdir"
b) leaving out an option argument, e.g. "-d -P prefix" instead of
   "-d dir -P prefix".
c) thinking that all the option arguments can come after all the options,
   e.g. expecting "-d -P dir prefix" or tar-style "-dP dir Prefix" to be
   equivalent to "-d dir -P prefix".

Single letter options can be combined (run together) provided that none
of them, or only the last one of them, takes an option argument.
e.g. "-vd dir" is equivalent to "-v -d dir".

> I'm posting this in the hopes that someone else experiencing this will
> search on "usage message" or "command syntax" in the maillist archive
> before posting, like I did, and see the reason for the repeated usage
> message.  I'm also hoping the developers might read it and consider
> implementing the POSIX standard for command line options, or at least
> including a note in the usage message that states that order of
> options matters.

If it does.  I think it doesn't.

All these commands work properly.  These are actual commands I just did,
and they all reported: "pk12util: PKCS12 IMPORT SUCCESSFUL"

pk12util -i $IMPORTFILE -d $HOME -P prefix -K test -W nss -v
pk12util -v -W nss -K test -P prefix -d $HOME  -i $IMPORTFILE

These commands all work too:

pk12util -l $LISTFILE -d $HOME -P prefix -W nss
pk12util -W nss -P prefix -d $HOME -l $LISTFILE
pk12util -v -l $LISTFILE -d $HOME -P prefix -W nss
pk12util -vl $LISTFILE -d $HOME -P prefix -W nss

/Nelson

_______________________________________________
dev-tech-crypto mailing list
dev-tech-crypto@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-tech-crypto

Reply via email to