[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[iaik-jce] SealedObject and ClassNotFoundException

Thanks again Dieter.  My problem was, as you surmised, that I had incorrectly specified the ObjectID.  Once I specified it according to the rules everything worked fine.
I have one more question on SealedObject.  If I call getObject on a SealedObject with a properly initialized cipher (NOT a key, as you pointed out earlier), it works fine on system objects, like String or Integer.  But if I run the same code on any class of mine, even one that implements Serializable properly, I throw a ClassNotFoundException.
Can you shed any light on this?
Aaron Haspel


> I assume this is supposed to be an ObjectID, e.g.:
>  public static ObjectID oid = new ObjectID("9.45.12345.17.8",

Yes. Even when customed, please be careful to specify a correct OID (i.e.
has to start with 0 or 1 or 2, ... see, for instance, Kaliski´s Layman´s
Guide for further rules (http://www.rsasecurity.com/rsalabs/pkcs/).

> V3Extension ext = m_cert.getExtension(CustomExtension.oid);

> I get a NullPointerException