Andrew Groom wrote, On 2008-03-12 20:16: > I seem to be having a problem with signtool from NSS 3.10 in that it's > not respecting any quoting of certificate names with spaces in them, e.g.: > > [EMAIL PROTECTED]:vortex$ ./bin/signtool -d ./my_cert_database -k "My New > Certificate" -p 'blah' ... > warning: unrecognized option: New > warning: unrecognized option: Certificate > > This used to work fine with a previous build of NSS 3.10 on another > Ubuntu machine, but the build on my new machine (same Ubuntu, btw, 7.10) > gives me this error. > > Any ideas / suggestions ?
Who built this signtool binary? The problem is almost certainly NOT in the c language code of the signtool program itself, but rather is in either the parent process (i.e. shell) that spawned the signtool child process. As I recall, the parsing of the command line into separate argument strings is not done by signtool itself, but is done for signtool, before signtool starts, by its parent. Signtool, like any c program, receives its command line string as a series of "argument" strings, e.g. argv[0]: ./bin/signtool argv[1]: -d argv[2]: ./my_cert_database argv[3]: -k argv[4]: My New Certificate argv[5]: -p ... and so on. The parent strips off the quotes, and passes the stuff in between them as a single string, as shown above. The behavior you're describing suggests that signtool did not receive the strings as shown above, but rather received them as: argv[0]: ./bin/signtool argv[1]: -d argv[2]: ./my_cert_database argv[3]: -k argv[4]: My argv[5]: New argv[6]: Certificate argv[7]: -p ... and so on. If that is what happened, then the code in the parent process has made the error, and signtool is merely the victim. Another possibility: was the space between -k and "My omitted? e.g. -k"My ? _______________________________________________ dev-tech-crypto mailing list dev-tech-crypto@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-tech-crypto