February 2005

Jython Presentation is up!

I’ve put the presentation up for tonight (its on the presentations page). I hope that there is a good turnout, as we had a slight hiccup in the RSVP process. I’m a little nervous giving this talk, as I am not as versed in Jython as I would like to be… As with Hibernate, I had not used Jython very much before I volunteered to speak about it, so I am still pretty green with the language. I think it is a testament to how good Python is that I now can think through and write most everything without going to the books or web… however, I still catch myself adding semicolons to the end of each line!

I hope that I can release JKeyManager in the next couple of weeks… these last few weeks have been torture.

Update: ( February 23, 2005 @ 10:41)
Well, I think the presentation was a success, if a little bumpy. I could answer most of the questions, and it seemed that people were interested in it. Also, I was able to get more people to sign up for presenting, though not as many as I was hoping. We really need people to get interested in contributing, otherwise we will end up going the same path as the previous OJUG. About 20 people showed up this time, so there is interest in the group, just not in contributing.

General
Java
OJUG

Comments (0)

Permalink

SHA-1 Broken

Bruce Schneier has a little writeup on this on his blog. This is so huge I can hardly believe it. This will have wide ranging implications for the entire cryptographic community. Every cryptographic application that I have ever written has used SHA-1 in some way, mainly for digital signatures. Heres to hoping that someone will come up with an algorithm that replaces it.

I wonder if in the mean time we will rely on a length based version of the SHA algorithm… say, for data sizes under 1Megabye we use SHA-1, 1Meg - 64Meg SHA-256, etc… I do not know what would be appropriate ranges, but amybe that will work for small to medium amounts of data .

Security

Comments (0)

Permalink

More on Class Loading

I was thinking about writing an article on what I recently learned about Java’s classloading capabilities. However, I was just surfing onjava.com and found the following article:

Internals of Java Class Loading by Binildas Christudas — When are two classes not the same? When they’re loaded by different class loaders. This is just one of many curious side effects of Java’s class-loading system. Binildas Christudas shows how different class loaders relate to one another and how (and why) to build your own custom class loader.

This covers exactly what I wanted to write about in nearly the same context. I was planning on writing about a Servlet based execution environment, where the system administrator could load patches while the application stays up. Basically, each session would be tied to a particular Classloader, so that each session maintains the same code version for the duration of the session. I handled all of this by defining a servlet that then mapped all URIs into the appropriate Class. I basically made a servlet into a Servlet container. Here is a web.xml entry for the loader:

So, the Loader servlet handles all URIs that start with /load/ and then uses a standard web.xml file for the class definitions. This makes it easy to put in place of an existing web.xml file and then use the old web.xml for the mapping. I may still write an article about it, but focus specifically on the mechanics of managing the patches. Not sure yet.

Java

Comments (0)

Permalink

Well, its been a few days since I’ve written anything. There are a few reasons for this. First, my brain feels like cement was poured over it sometime last night. My entire family has come down with some sort of cold. We are all in a nasty funk - which leads directly into the second reason I haven’t written in a while: I have been busy helping Amanda (my wife) take care of two sick kids. Emma, our precious 3 year old, has a minor cold, and Jack, our 3 month old, has some sinus issues (== snot). On top of that, Amanda and I both feel like crap.

I am scheduled to give a presentation on Jython next Monday to the OJUG. I’m not nearly asprepared as I would like to be. I want to speak on this topic because it interests me, and so that I can learn the technology. Stephen Covey writes in his book The Seven Habits of Highly Effective People that one of the best techniques to help learn is to know that you will be taching this information to someone else. It is usually a great motivator for me. This time however, I just don’t feel that. Maybe it is because I have pushed myself a little too much on JKeyManager. I am way ahead of my anticipated schedule for that. Maybe it the work I am doing at my job. Or maybe it the preparation for the CLEP tests I am about to take (I’m finishing up my Bachelors). I really don’t know. Regardless, I need to pull it together this week, so I probably will not get much done on JKeyManager this week, as that is the easiest thing to drop. I will also ingore the CLEP studying for the week as well.

General

Comments (0)

Permalink

Time for some new screenshots

I’ve been keeping busy. The first installment of the application is about done. I am way ahead of my schedul, and I am very happy with the results so far. Here are the completed features:

  • Open Keystore (works automatically for any supported type)
  • Save Keystore
  • Save KeyStore As…
  • Close KeyStore
  • New KeyStore
  • Delete Key Entry

That doesn’t sound like much, and over all, those tasks were easy. It was getting an architecture in place that allows me to write the actual “functional” code quickly. Here is what I’ve done on the architecture side:

  • Configurable Action Definitions - a HashMap of all the Action classes loaded up at startup into a HashMap.
  • Config - central Configuration management. Allows for a “default” implementation, and a user specific.
  • Centralized Application State - a Central repository for all information, using String keys to access individual properties (again, a HashMap). The ApplicationState object also uses the Observer pattern (Using JFace’s Listener Interface) to facilitate notification of state cahgne to all interested components.
  • TableViewer implementation - This is the central “view” of the app, and as such is central to the whole program.

Unfortunately, I feel that I am not quite doing the TableViewer right yet. The TableViewer widget is pretty complex as far as SWT/JFace goes. I’ve had to create a lot of helper and anonymous inner classes to handle things that I was hoping the TableViewer would handle itself, such as defining a Sorting mechanism for each column. It *should* (in my opinion) be as easy as

tableViewer.getColumn(index).setSorter(new MySorter())

Instead, it is like this:

col1.addSelectionListener(new SelectionAdapter() {
    public void widgetSelected(SelectionEvent e) {
      table.setSorter(new KeysTableSorter(Constants.KeyTypeColumn));
      main.fireEvent(Constants.RefreshAction);
    }
});

… with the KeysTableSorter helper class handling all of the comparisons. I am OK with a small helper class now and then, but when you are dealing with simple data types (String, int, and java.util.Date), I would think that there could be a general purpose sorter for each type. It should only be necessary to create your own sorter when you have peculiar data going into the column.

Anyway, enough ranting. Here are the new screenshots:

JKeyManger when first opened

JKeyManager when first opened. Note all of the disabled icons.

JKeyManger after KeyStore is opened

JKeyManger after KeyStore is opened

I still have a few more items (important ones) that need to be handled before I release:

  • KeyPair / Certificate generation
  • Import / Export of Certificates, PrivateKeys (X.509 and PKCS12)
  • Somewhat optional: SecretKey generation - this is a really triky one, so I’m not sure what type of support it will have right now
  • Key Details Viewer - this one I’m not sure how much I can do right now… there may be no viewer at all

And last but definetly not least:

  • Documentation
  • Release / Install packaging

General

Comments (0)

Permalink