Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

NSS 3.52.1 modutil

21 views
Skip to first unread message

ush...@gmail.com

unread,
Sep 22, 2020, 7:48:49 PM9/22/20
to mozilla-dev...@lists.mozilla.org
Hello

I see difference in behavior on platforms with NSS 3.52.1 modutil when executed from Java program.

Flow of the processing :
Java code( via ProcessBuilder ) executes batch/shell script which in turn executes the nss modutil command.

When I’m launching java program, process’s outputstream is script’s stdin which I’m writing sensitive data to which in turn should be then sent to nss modutil command. This works fine on Windows.

On Linux though, instead of reading the data that was sent by Java program on stdin, I see the unexpected prompt on the console.

excerpt of Java code:
...
ProcessBuilder pb = new ProcessBuilder( script_to_execute );
Process process;
process = pb.start();
OutputStream osw= process.getOutputStream()
for ( char[] param : arrParams )
{
osw.write(param);
osw.write(newline);
}
osw.flush()
...

excerpt of script :
..
# initialize NSS database with the password if the token has not been initialized or change NSS Database password from old password to new password if token has been initialized.
"${XXX}/modules/NSS/bin/modutil" -force -dbdir sql:"${XX}/data/NSS/db" -changepw "NSS Certificate DB"
...

Any help greatly appreciated

Thanks..


0 new messages