From: Omry Y. <om...@ya...> - 2007-09-26 08:04:22
|
Looking at the code of Utility.java, it looks you the problem you describe can only appear if you send the wrong target dir to the preverify function. so your fix (although it may have accidentally fixed that problem) is not the correct thing to fix. about WtkSign: 1. did you encounter any actual device that refused to grant permissions to a midlet signed by the current mechanism and allowed access to one signed by your version? to my knowledge, the JAR itself does not need to be signed, and experience shows that the current code works fine. 2. this code was written when there was a serious bug with WTK that prevented proper signing using wtksign (if I remember correctly). I don't see the fact that it uses the Java API instead of calling the WTK/JDK tools as a problem. as to the problem with the version number ,I fixed it (will be correct in the next release). Thanks for your help. Omry. Alessandro Volz wrote: > Here's the message i sent to Jörg about the fix - you might wanna know > i'm on macosx: > >> I modified the source to make it display the preverify command it >> invokes. >> >> [wtkbuild] >> ************************************************************** >> [wtkbuild] * Antenna 0.9.15 initialized for project "Test" >> * >> [wtkbuild] * Using Sun Wireless Toolkit 2.5 (CLDC-1.0; MIDP-1.0) >> * >> [wtkbuild] >> ************************************************************** >> [wtkpreverify] Preverifying /Users/aless/Projects/HDS/Test/build >> [wtkpreverify] Preverifying: >> /Users/aless/Projects/HDS/Test/../tools/WTK-2.5.1/bin/preverify >> -classpath >> /Users/aless/Projects/HDS/Test/../tools/WTK-2.5.1/lib/midpapi10.jar:/Users/aless/Projects/HDS/Test/../tools/WTK-2.5.1/lib/cldcapi10.jar:/Users/aless/Projects/HDS/Test/../tools/WTK-2.5.1/lib/jsr75.jar:/Users/aless/Projects/HDS/Test/resources >> -d /Users/aless/Projects/HDS/Test/preverified -cldc1.0 >> /Users/aless/Projects/HDS/Test/build >> >> this works fine, now i switch to >> <property name="wtk.cldc.version" value="1.1" /> >> <property name="wtk.midp.version" value="2.0" /> >> >> and >> >> [wtkbuild] >> ************************************************************** >> [wtkbuild] * Antenna 0.9.15 initialized for project "Test" >> * >> [wtkbuild] * Using Sun Wireless Toolkit 2.5 (CLDC-1.1; MIDP-2.0) >> * >> [wtkbuild] >> ************************************************************** >> [wtkbuild] Compiling 3 source files to >> /Users/aless/Projects/HDS/Test/ab0d79b8.tmp/tmpclasses >> [wtkbuild] Preverifying >> /Users/aless/Projects/HDS/Test/ab0d79b8.tmp/tmpclasses >> [wtkbuild] Preverifying: >> /Users/aless/Projects/HDS/Test/../tools/WTK-2.5.1/bin/preverify >> -classpath >> /Users/aless/Projects/HDS/tools/WTK-2.5.1/lib/midpapi20.jar:/Users/aless/Projects/HDS/tools/WTK-2.5.1/lib/cldcapi11.jar:/Users/aless/Projects/HDS/tools/WTK-2.5.1/lib/jsr75.jar:/Users/aless/Projects/HDS/Test/resources: >> -d >> /Users/aless/Projects/HDS/Test/build/Users/aless/Projects/HDS/Test/ab0d79b8.tmp/tmpclasses >> >> this doesn't work because you're not inserting a whitespace >> between */Users/aless/Projects/HDS/Test/build* AND >> */Users/aless/Projects/HDS/Test/ab0d79b8.tmp/tmpclasses *- in fact >> the way you're adding whitespaces is a bit wild... but well it works >> does it? so be sure to add ONE MORE.... this way: >> file Utility.java line 806 changes to >> String arguments = "-classpath " + >> getOutsideQuotedPath(classpath) + " -d " + target + " "; >> (the last + " " has been added) > > Now, about WtkSign, the problem is: > - that it only takes care of the JAD file, leaving the JAR untouched > (the JAR should itself contain the certificates and signatures) > - that it uses its own code instead of WTK readymade things, while > imho Antenna should rely on WTK (this is minor, yep) > > I attached my WtkSign.java file to this message > > > ------------------------------------------------------------------------ > > > It does things as explained > on http://www.spindriftpages.net/blog/dave/2006/06/18/midlet-jar-signing-a-tutorial-revised/ > > Please send me your reactions. Thanks, > Alessandro > > On Sep 25, 2007, at 1:18 PM, Omry Yadan wrote: > >> please submit your fixes as patches along with an explanation as to what >> >> they fix. >> >> >> about WtkSign, which half of the job it's not doing? >> > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > ------------------------------------------------------------------------ > > _______________________________________________ > Antenna-discussion mailing list > Ant...@li... > https://lists.sourceforge.net/lists/listinfo/antenna-discussion > |