ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 49232] New: signjar task: AbstractJarSignerTask is not successfully filtering out passphrase prompt for storepass, keypass
Date Fri, 30 Apr 2010 00:01:45 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=49232

           Summary: signjar task: AbstractJarSignerTask is not
                    successfully filtering out passphrase prompt for
                    storepass, keypass
           Product: Ant
           Version: 1.8.0
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core tasks
        AssignedTo: notifications@ant.apache.org
        ReportedBy: jonabbey@ganymeta.org


For several revisions now, the signjar task has had a bug in which providing
the storepass and keypass arguments to the signjar task element has not
prevented Ant
from displaying the prompt 'Enter Passphrase from keystore: ' followed by a
command to turn off echo mode in the terminal discipline.

The problem with this is that when I run ant against my build.xml in emacs, the
prompt for the passphrase and the terminal discipline shenanigans cause emacs
to interrupt whatever else I'm doing and prompt for the passphrase, despite my
already having provided that in the signjar element.

Looking at the source code, it appears that the createRedirector() method in
org.apache.tools.ant.taskdefs.AbstractJarSignerTask is using a
RedirectorElement to handle interposition of input data and output filtering
when running the JDK's jarsigner application.

createRedirector() actually creates a RedirectorElement with logic to
explicitly filter the passphrase out so that it is not unnecessarily sent to
the console.

>From my testing on Linux, it appears that jarsigner actually emits that prompt
to stdout, not stderr as is assumed in createRedirector().  If
line 256 of AbstractJarSignerTask.java was changed from
'createErrorFilterChain().addLineContainsRegExp(filter)' to
'createOutputFilterChain().addLineContainsRegexp(filter)', it would properly
inhibit the display of the useless prompt.

I have not yet built a test against this to see if filtering out the prompt
causes emacs to do the right thing, but I will try to get it built and tested
anon.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Mime
View raw message