[Muscle] DSAPrivateKey referenz in applet
Sunil Pilani
spilani at gmx.net
Wed Jul 23 12:53:27 PDT 2008
Hi,
Can somebody please help me solve this problem:
1. I have generated a key pair on the host application.
2. I have a KeyBuilder instance in the constructor of the interface implementation(JCRmi) on JC-environment(cref/jcwde)
3. Now, I want to export the P,G,Q,X to the applet to initialize the private key
The problem lies in the step 3, when I call remote method to set a parameter, the reference to the DSAPrivateKey dsaPrivKey is null. I have tried to call this reference in helper method. There too, it is null.
private DSAPrivateKey dsaPrivKey;
public EncryptImp() {
// TODO Auto-generated constructor stub
privKey = new byte[336];
p = new byte[128];
g = new byte[128];
q = new byte[21];
x = new byte[21];
try {
/* create a Keybuilder */
dsaPrivKey = (DSAPrivateKey) KeyBuilder.buildKey(
KeyBuilder.TYPE_DSA_PRIVATE, KeyBuilder.LENGTH_DSA_1024,
false);
...
public short setP(byte[] pParam, short offset) throws RemoteException {
...
try {
dsaPrivKey.setP(p, (short) 0, (short) p.length);/* throws
NullPointerException */
} catch (CryptoException ex) {
ex.getReason();
return P_NOT_SET;
}
...
Greetings,
Linus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drizzle.com/pipermail/muscle/attachments/20080723/6515c0aa/attachment.html
More information about the Muscle
mailing list