Friday, March 25, 2011

Mechanism for Simplifying User Password Creation via Client-Side Applications

Once upon a time, I came up with an idea, which can probably be viewed as a major enhancement on top of what Firefox's built-in password manager already has to offer.

I developed this idea with both the common folks and the tech savvy in mind:
The aim is to reduce the number of unique passwords a user has to remember by employing an application to generate new ones on behalf of the user.
In the simplest use case, the user only needs to remember one unique password. The application will use the value provided by the user and a context value (that uniquely identifies the Service Providers with which to authenticate) to produce new passwords.
It got published in the Research Research Disclosure Journal in April 2007 under Disclosure Id: 516023.

All that remains is finding the time to implement it :p

As I dig deeper, it seems that a lot of plugins already do something similar with LastPass probably coming the closest.

Saturday, March 19, 2011

Idea Day: Scan for shared webapp dependencies and move them to the common/lib folder

Welcome to Idea Day!
It is 6:43 AM on 3/19/2011 and its a Saturday.
Lets get cracking :)

Google search for "tomcat scan detect common jars" yielded some reading material for starters - jar-scanner and loader - but both these seemed to be get kicked-off per web-application whereas something more global is required to move jars around and thin the pack before web applications are considered at all.

Let us break-down the process:
  1. Tomcat starts
  2. Hook-in at the point where we have a list of the docBase attribute for all the web applications that will be hosted by this tomcat instance. And none of the web application specific handling has begun yet.
    1. Loop over each ${docBase}/WEB-INF/lib folder and make a list of common jars.
    2. Try to decide "commonality" based on a combination of the following factors:
      • start by doing a fuzzy match on the file name
      • then try to match the jar version in the names or if you can find it by introspecting the jar's manifest
      • and at the end confirm by doing an exact match on the file size
      • Thought: generating and comparing md5 hashes on files might yield the same results quicker?
  3. Even after the jar dependencies have been moved to common/lib folder, one might not want to expose any of the other common jars in the shared folder to their webapp. For this case, the wiki about embedding JBoss into Tomcat gives us an idea about the possibility of only having each web application refer strictly to the jars it really needs via the help of a resource scanner listener.
Possible pitfalls:
  1. There may not be a hook in the tomcat code where we have a consolidated list of the docBase attribute for all the web applications!
  2. Even if such a hook exists, it may be happening at three different places:
    1. when the application contexts defined via server.xml are processed,
    2. when the war files directly under the webapps/ folderare processed,
    3. and when the context-fragment files under conf/Catalina/localhost/ folder are processed!
  3. The user starting tomcat may not have the permissions required to move the files around.
Alternate approach:
  1. Piggyback off a resource scanner listener per application and create a list/report as each individual app comes up.
  2. Then Tomcat can be shutdown and the list/report can be acted upon by a script that runs under an admin/root account to achieve the same results as before.
  3. Starting back the tomcat server afterwards should be fine.
It is now 7:33 PM on 3/19/2011 and it still a Saturday :)
Sent an email to the tomcat users list to find out if a hook into the process exists.
Started the process of getting and building the source-code for Tomcat.

Friday, March 18, 2011

Escape dollar sign in maven's pom.xml file

When you want to escape stuff like <hello>world</hello> in your maven pom.xml file, you can do so by following the basic XML conventions and writing it as &lt;hello&gt;world&lt;/hello&gt;

But for some reason escaping the dollar sign doesn't seem so simple. So one usually turns to Google for an answer ... BUT before you go running around integrating velocity with maven because the top Google search results for escaping a dollar sign lead you the FAQ at http://docs.codehaus.org/display/MAVENUSER/Assembly+Plugin ... please know that something as simple as writing $${show_me} works and results in ${show_me} being escaped!

Thursday, March 17, 2011

Java and Locale based formatting

Folks working on localization, often ends up in situations they need to see a list of what the Locale specific information looks like in Java. They need a sample of each locale and not just a simple list of supported locales.

Here's a simple implementation (+/-) thrown together after googling the basics of the Java API, that renders a table which has samples of localized in each and every locale supported by Java.

import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.io.UnsupportedEncodingException;
import java.text.DateFormat;
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.util.Currency;
import java.util.Date;
import java.util.Locale;

public class CurrencyFormatterExample {
  
    private static PrintWriter pw;

    public static void format(Locale currentLocale) {
    Double price = new Double(1234.56);
    NumberFormat currencyFormatter;
    DateFormat df = DateFormat.getDateTimeInstance(DateFormat.LONG,
        DateFormat.MEDIUM, currentLocale);
    String currencyOut;
    currencyFormatter = NumberFormat.getCurrencyInstance(currentLocale);
    currencyOut = currencyFormatter.format(price);
    Currency currency = currencyFormatter.getCurrency();
    String dateFormat = df.format(new Date());
        pw.print("<tr><td>" + currentLocale.toString() + "</td>" +
                 "<td>" + currencyOut + "</td>" +
                 "<td>" + currency.getCurrencyCode() + "</td>" +
                 "<td>" + currency.getSymbol(currentLocale) + "</td>" +
                 "<td>" + unicodeEscape(currency.getSymbol(currentLocale)) + "</td>" +
                 "<td>" + dateFormat + "</td></tr>");
        System.out.println(currentLocale.toString() + "\t\t" + currencyOut + "\t\t" + dateFormat);
    }

    public static void main(String args[]) throws UnsupportedEncodingException {
    try {
        pw = new PrintWriter("format.html", "UTF-8");
        pw.print("<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" /></head>");
        pw.print("<body><table>");
        pw.print("<tr><th>LOCALE</th>" +
                     "<th>FORMATTED PRICE</th>" +
                     "<th>CURRENCY CODE</th>" +
                     "<th>CURRENCY SYMBOL</th>" +
                     "<th>UNICODE ESCAPED CURRENCY SYMBOL</th>" +
                     "<th>FORMATTED DATE</th></tr>");
        Locale[] locales = Locale.getAvailableLocales();
        for (int i = 0; i < locales.length; i++) {
        CurrencyFormatterExample.format(locales[i]);
        }
        pw.print("</table></body></html?");
        pw.close();
    } catch (FileNotFoundException e) {
        e.printStackTrace();
    }
    }

    private static final char[] hexChar = {
        '0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'
    };

    private static String unicodeEscape(String s) {
    StringBuilder sb = new StringBuilder();
    for (int i = 0; i < s.length(); i++) {
        char c = s.charAt(i);
        if ((c >> 7) > 0) {
        sb.append("\\u");
        sb.append(hexChar[(c >> 12) & 0xF]);
        sb.append(hexChar[(c >> 8) & 0xF]);
        sb.append(hexChar[(c >> 4) & 0xF]);
        sb.append(hexChar[c & 0xF]);
        }
        else {
        sb.append(c);
        }
    }
    return sb.toString();
    }

}

Often with such code, the printout on the java console in eclipse works fine but the populated dates, numbers and currencies in different languages, cannot be seen in the browser. I ripped of the Unicode escaping code after some googling to fix this issue. I don’t know how great the algorithm is but it does the job as far as I can tell.

Another unique feature of the generated table is that XXX is thrown in as a placeholder where ever the row represents a language and not a region so it does not have a currency associated with it.

LOCALEFORMATTED PRICECURRENCY CODECURRENCY SYMBOLUNICODE ESCAPED CURRENCY SYMBOLFORMATTED DATE
ja_JP¥1,235JPY\uFFE52010/10/22 10:53:17
es_PES/1.234,56PENS/S/22 de octubre de 2010 10:53:17 AM
en¤1,234.56XXXXXXXXXOctober 22, 2010 10:53:17 AM
ja_JP_JP¥1,235JPY\uFFE5H22.10.22 10:53:17
es_PAB1,234.56PABBB22 de octubre de 2010 10:53:17 AM
sr_BAКМ. 1.234,56BAMКМ.\u041A\u041C.22. октобар 2010. 10:53:17
mk¤ 1.234,56XXXXXXXXX22, октомври 2010 10:53:
es_GTQ1,234.56GTQQQ22 de octubre de 2010 10:53:17 AM
ar_AEد.إ.‏ 1,234.56AEDد.إ.‏\u062F.\u0625.\u200F22 أكتوبر, 2010 10:53:17 ص
no_NOkr 1 234,56NOKkrkr22. oktober 2010 10:53:17
sq_ALLek1.234,56ALLLekLek2010-10-22 10:53:17.PD
bg¤ 1 234,56XXXXXXXXXПетък, 2010, Октомври 22 10:53:17
ar_IQد.ع.‏ 1,234.56IQDد.ع.‏\u062F.\u0639.\u200F22 أكتوبر, 2010 10:53:17 ص
ar_YEر.ي.‏ 1,234.56YERر.ي.‏\u0631.\u064A.\u200F22 أكتوبر, 2010 10:53:17 ص
hu¤ 1 234,56XXXXXXXXX2010. október 22. 10:53:17
pt_PT1.234,56 €EUR\u20AC22 de Outubro de 2010 10:53:17
el_CY€1.234,56EUR\u20AC22 Οκτώβριος 2010 10:53:17 ΠΜ
ar_QAر.ق.‏ 1,234.56QARر.ق.‏\u0631.\u0642.\u200F22 أكتوبر, 2010 10:53:17 ص
mk_MKDen 1.234,56MKDDenDen22, октомври 2010 10:53:
sv¤ 1 234,56XXXXXXXXXden 22 oktober 2010 10:53:17
de_CHSFr. 1'234.56CHFSFr.SFr.22. Oktober 2010 10:53:17
en_US$1,234.56USD$$October 22, 2010 10:53:17 AM
fi_FI1 234,56 €EUR\u20AC22. lokakuuta 2010 10:53:17
is¤ 1.234,56XXXXXXXXX22. október 2010 10:53:17
cs¤ 1 234,56XXXXXXXXX22. říjen 2010 10:53:17
en_MT€1,234.56EUR\u20AC22 October 2010 10:53:17
sl_SI€ 1.234,56EUR\u20ACPetek, 22 oktober 2010 10:53:17
sk_SK1 234,56 SkSKKSkSkPiatok, 2010, október 22 10:53:17
it¤ 1.234,56XXXXXXXXX22 ottobre 2010 10.53.17
tr_TR1.234,56 YTLTRYYTLYTL22 Ekim 2010 Cuma 10:53:17
zh¤ 1,234.56XXXXXXXXX2010年10月22日 10:53:17
th¤ 1,234.56XXXXXXXXX22 ตุลาคม 2010, 10:53:17
ar_SAر.س.‏ 1,234.56SARر.س.‏\u0631.\u0633.\u200F22 أكتوبر, 2010 10:53:17 ص
no¤ 1 234,56XXXXXXXXX22. oktober 2010 10:53:17
en_GB£1,234.56GBP£\u00A322 October 2010 10:53:17
sr_CSCSD 1.234,56CSDCSDCSD22.10.2010. 10.53.17
lt¤ 1 234,56XXXXXXXXXPenktadienis, 2010, Spalio 22 10.53.17
ro¤ 1.234,56XXXXXXXXX22 octombrie 2010 10:53:17
en_NZ$1,234.56NZD$$22 October 2010 10:53:17 AM
no_NO_NYkr 1 234,56NOKkrkr22. oktober 2010 10:53:17
lt_LT1 234,56 LtLTLLtLtPenktadienis, 2010, Spalio 22 10.53.17
es_NI$C1,234.56NIO$C$C22 de octubre de 2010 10:53:17 AM
nl¤ 1.234,56XXXXXXXXX22 oktober 2010 10:53:17
ga_IE€1,234.56EUR\u20AC22 Deireadh Fómhair 2010 10:53:17
fr_BE1.234,56 €EUR\u20AC22 octobre 2010 10:53:17
es_ES1.234,56 €EUR\u20AC22 de octubre de 2010 10:53:17
ar_LBل.ل.‏ 1,234.56LBPل.ل.‏\u0644.\u0644.\u200F22 تشرين الأول, 2010 10:53:17 ص
ko¤ 1,234.56XXXXXXXXX2010년 10월 22일 (금) 오전 10:53:17
fr_CA1 234,56 $CAD$$22 octobre 2010 10:53:17
et_EE1 234,56 krEEKkrkrreede, 22. Oktoober 2010. a 10:53:17
ar_KWد.ك.‏ 1,234.56KWDد.ك.‏\u062F.\u0643.\u200F22 أكتوبر, 2010 10:53:17 ص
sr_RSRSD 1.234,56RSDRSDRSD22.10.2010. 10.53.17
es_USUS$1,234.56USDUS$US$22 de octubre de 2010 10:53:17 a.m.
es_MX$1,234.56MXN$$22 de octubre de 2010 10:53:17 AM
ar_SDج.س.‏ 1,234.56SDGج.س.‏\u062C.\u0633.\u200F22 أكتوبر, 2010 10:53:17 ص
in_IDRp1.234,56IDRRpRp22 Oktober 2010 10:53:17
ru¤ 1 234,56XXXXXXXXX22 Октябрь 2010 г. 10:53:17
lv¤ 1 234,56XXXXXXXXXpiektdiena, 2010, 22 oktobris 10:53:17
es_UYNU$ 1.234,56UYUNU$NU$22 de octubre de 2010 10:53:17 AM
lv_LV1 234,56 LsLVLLsLspiektdiena, 2010, 22 oktobris 10:53:17
iw¤ 1,234.56XXXXXXXXX10:53:17 22 אוקטובר 2010
pt_BRR$ 1.234,56BRLR$R$22 de Outubro de 2010 10:53:17
ar_SYل.س.‏ 1,234.56SYPل.س.‏\u0644.\u0633.\u200F22 تشرين الأول, 2010 10:53:17 ص
hr¤ 1.234,56XXXXXXXXX2010. listopad 22 10:53:17
et¤ 1 234,56XXXXXXXXXreede, 22. Oktoober 2010. a 10:53:17
es_DORD$1,234.56DOPRD$RD$22 de octubre de 2010 10:53:17 AM
fr_CHSFr. 1'234.56CHFSFr.SFr.22. octobre 2010 10:53:17
hi_INरू १,२३४.५६INRरू\u0930\u0942२२ अक्‍तूबर, २०१० १०:५३:१७ पूर्वाह्न
es_VEBsF.1.234,56VEFBsF.BsF.22 de octubre de 2010 10:53:17 AM
ar_BHد.ب.‏ 1,234.56BHDد.ب.‏\u062F.\u0628.\u200F22 أكتوبر, 2010 10:53:17 ص
en_PHPhp1,234.56PHPPhpPhpOctober 22, 2010 10:53:17 AM
ar_TNد.ت.‏ 1,234.56TNDد.ت.‏\u062F.\u062A.\u200F22 أكتوبر, 2010 10:53:17 ص
fi¤ 1 234,56XXXXXXXXX22. lokakuuta 2010 10:53:17
de_AT€ 1.234,56EUR\u20AC22. Oktober 2010 10:53:17
es¤1.234,56XXXXXXXXX22 de octubre de 2010 10:53:17
nl_NL€ 1.234,56EUR\u20AC22 oktober 2010 10:53:17
es_EC$1.234,56USD$$22 de octubre de 2010 10:53:17 AM
zh_TWNT$1,234.56TWDNT$NT$2010年10月22日 上午 10:53:17
ar_JOد.أ.‏ 1,234.56JODد.أ.‏\u062F.\u0623.\u200F22 تشرين الأول, 2010 10:53:17 ص
be¤ 1 234,56XXXXXXXXXпятніца, 22, кастрычніка 2010 10.53.17
is_IS1.235, kr.ISKkr.kr.22. október 2010 10:53:17
es_CO$1.234,56COP$$22 de octubre de 2010 10:53:17 AM
es_CRC1,234.56CRCCC22 de octubre de 2010 10:53:17 AM
es_CLCh$1.235CLPCh$Ch$22 de octubre de 2010 10:53:17 AM
ar_EGج.م.‏ 1,234.56EGPج.م.‏\u062C.\u0645.\u200F22 أكتوبر, 2010 10:53:17 ص
en_ZAR 1,234.56ZARRR22 October 2010 10:53:17 AM
th_TH฿1,234.56THB฿\u0E3F22 ตุลาคม 2553, 10:53:17
el_GR1.234,56 €EUR\u20AC22 Οκτώβριος 2010 10:53:17 πμ
it_IT€ 1.234,56EUR\u20AC22 ottobre 2010 10.53.17
ca¤ 1.234,56XXXXXXXXX22 / octubre / 2010 10:53:17
hu_HU1 234,56 FtHUFFtFt2010. október 22. 10:53:17
fr1 234,56 ¤XXXXXXXXX22 octobre 2010 10:53:17
en_IE€1,234.56EUR\u20AC22 October 2010 10:53:17
uk_UA1.234,56 грв.UAHгрв.\u0433\u0440\u0432.22 жовтня 2010 10:53:17
pl_PL1 234,56 złPLNz\u014222 październik 2010 10:53:17
fr_LU1 234,56 €EUR\u20AC22 octobre 2010 10:53:17
nl_BE1.234,56 €EUR\u20AC22 oktober 2010 10:53:17
en_INRs.1,234.56INRRs.Rs.22 October, 2010 10:53:17 AM
ca_ES€ 1.234,56EUR\u20AC22 / octubre / 2010 10:53:17
ar_MAد.م.‏ 1,234.56MADد.م.‏\u062F.\u0645.\u200F22 أكتوبر, 2010 10:53:17 ص
es_BOB$1.234,56BOBB$B$22 de octubre de 2010 10:53:17 AM
en_AU$1,234.56AUD$$22 October 2010 10:53:17 AM
sr¤ 1.234,56XXXXXXXXX22.10.2010. 10.53.17
zh_SGS$1,234.56SGDS$S$22 十月 2010 上午 10:53
pt¤ 1.234,56XXXXXXXXX22 de Outubro de 2010 10:53:17
uk¤ 1.234,56XXXXXXXXX22 жовтня 2010 10:53:17
es_SVC1,234.56SVCCC22 de octubre de 2010 10:53:17 AM
ru_RU1 234,56 руб.RUBруб.\u0440\u0443\u0431.22 Октябрь 2010 г. 10:53:17
ko_KR₩1,235KRW\uFFE62010년 10월 22일 (금) 오전 10:53:17
vi¤ 1.234,56XXXXXXXXX10:53:17 Ngày 22 tháng 10 năm 2010
ar_DZد.ج.‏ 1,234.56DZDد.ج.‏\u062F.\u062C.\u200F22 أكتوبر, 2010 10:53:17 ص
vi_VN1.234,56 đVNDđ\u011110:53:17 Ngày 22 tháng 10 năm 2010
sr_ME€ 1.234,56EUR\u20AC22.10.2010. 10.53.17
sq¤ 1.234,56XXXXXXXXX2010-10-22 10:53:17.PD
ar_LYد.ل.‏ 1,234.56LYDد.ل.‏\u062F.\u0644.\u200F22 أكتوبر, 2010 10:53:17 ص
ar¤ 1,234.56XXXXXXXXX22 أكتوبر, 2010 10:53:17 ص
zh_CN¥1,234.56CNY\uFFE52010年10月22日 10:53:17
be_BYРуб1 235BYRРуб\u0420\u0443\u0431пятніца, 22, кастрычніка 2010 10.53.17
zh_HKHK$1,234.56HKDHK$HK$2010年10月22日 星期五 上午10:53:17
ja¤ 1,234.56XXXXXXXXX2010/10/22 10:53:17
iw_IL1,234.56 ש"חILSש"ח\u05E9"\u05D710:53:17 22 אוקטובר 2010
bg_BGлв.1 234,56BGNлв.\u043B\u0432.Петък, 2010, Октомври 22 10:53:17
in¤1.234,56XXXXXXXXX2010 Oktober 22 10:53:17
mt_MT€1,234.56EUR\u20AC22 ta’ Ottubru 2010 10:53:17
es_PYG1.235PYGGG22 de octubre de 2010 10:53:17 AM
sl¤ 1.234,56XXXXXXXXXPetek, 22 oktober 2010 10:53:17
fr_FR1 234,56 €EUR\u20AC22 octobre 2010 10:53:17
cs_CZ1 234,56 KčCZKK\u010D22. říjen 2010 10:53:17
it_CHSFr. 1'234.56CHFSFr.SFr.22. ottobre 2010 10:53:17
ro_RO1.234,56 LEIRONLEILEI22 octombrie 2010 10:53:17
es_PR$1,234.56USD$$22 de octubre de 2010 10:53:17 AM
en_CA$1,234.56CAD$$October 22, 2010 10:53:17 AM
de_DE1.234,56 €EUR\u20AC22. Oktober 2010 10:53:17
ga¤ 1,234.56XXXXXXXXX2010 Deireadh Fómhair 22 10:53:17
de_LU1.234,56 €EUR\u20AC22. Oktober 2010 10:53:17
de¤ 1.234,56XXXXXXXXX22. Oktober 2010 10:53:17
es_AR$1.234,56ARS$$22 de octubre de 2010 10:53:17
sk¤ 1 234,56XXXXXXXXXPiatok, 2010, október 22 10:53:17
ms_MYRM1,234.56MYRRMRM22 Oktober 2010 10:53:17 AM
hr_HRKn 1.234,56HRKKnKn2010. listopad 22 10:53:17
en_SG$1,234.56SGD$$October 22, 2010 10:53:17 AM
da¤ 1.234,56XXXXXXXXX22. oktober 2010 10:53:17
mt¤ 1,234.56XXXXXXXXX22 ta’ Ottubru 2010 10:53:17
pl¤ 1 234,56XXXXXXXXX22 październik 2010 10:53:17
ar_OMر.ع.‏ 1,234.56OMRر.ع.‏\u0631.\u0639.\u200F22 أكتوبر, 2010 10:53:17 ص
tr1.234,56 ¤XXXXXXXXX22 Ekim 2010 Cuma 10:53:17
th_TH_TH฿๑,๒๓๔.๕๖THB฿\u0E3F๒๒ ตุลาคม ๒๕๕๓, ๑๐:๕๓:๑๗
el¤ 1.234,56XXXXXXXXX22 Οκτώβριος 2010 10:53:17 πμ
ms¤ 1,234.56XXXXXXXXX2010 Oktober 22 10:53:17
sv_SE1 234,56 krSEKkrkrden 22 oktober 2010 10:53:17
da_DKkr 1.234,56DKKkrkr22. oktober 2010 10:53:17
es_HNL1,234.56HNLLL22 de octubre de 2010 10:53:17 AM


Wednesday, March 16, 2011

Running external commands from Java

I am not a big fan of Runtime.exec for running commands via Java because there are so many fine points to take into account that running one or two simple commands requires the creation of an entire robust ecosystem. And if I ever have to repeat the process in a different codebase then writing the code again from scratch is very cumbersome.

One fine day I said to myself: Someone's got to have already written and shared these fail-safes in open-source ... right?

My search led me to commons-exec and I was thrilled! The apache website tutorial is not very enlightening about the API itself. Instead, it is this blog entry that fully allows one to understand and utilize the power of commons-exec. But an example of how to capture user-input using commons-exec is still missing from the web.

Also I ran across a library provided by Maven as part of their cookbook for maven plugin developers. I haven't experimented with it enough to talk about it but its out there.

Sunday, March 6, 2011

Wish List: Integrate openssl and/or keytool funtionality into Windows Right-Click context menu

Techies have it real good. So much that we need is already out there in the world and to top it all off there's Google so that we may find what we need! Yet, sometimes I come across problems that make me wonder: "Do we really have it all?"

I have had my fair share of banging my head bloody against the computer screen ... trying to re-learn keytool & openssl syntax, again! It takes 1 month to remind myself of all the caveats and for another month I enjoy expert status. Then the vicious cycle begins again where I don't need to use them and the 10 month hibernation strips away my facilities from me. That's my year right there .... happy new year? I think not!

So what's on my wish list?
  1. Establish a 3 letter extension syntax to honor what's what for public/private keypair based security. It is far too loose today and makes the creation of tooling more challenging than it needs to be.
    1. Public/Private Keypairs: should at least end with pem or der
      • filename.pem
      • filename.der
    2. Certificate Signing Requests: should end with csr
      • filename.csr
    3. Keystores should clearly define their own format
      • filename.jks
  2. Tools or widgets or plugins ... something should be available which makes life easier by allowing the user to right-click a file and take any valid action supported by openssl or keytool.
I don't want to make it seem like "the sky is falling" ... to be fair, it is not like the security space is completely without tooling. Some decent solutions exist that make key and certificate management simpler:
  1. Portecle: is a user friendly GUI application for creating, managing and examining key stores, keys, certificates, certificate requests, certificate revocation lists and more.
    • Wrapping Portecle with Jar Bundler works well for mac. And if you need to run it as root, you can use "sudo open portecle.app" to launch it.
  2. KeyStore Explorer: is a free GUI replacement for the Java command-line utilities keytool, jarsigner and jadtool. KeyStore Explorer presents their functionality, and more, via an intuitive graphical user interface