[Webfunds-devel] progress, but a glitch with PGPSignaturePacket?
Ian Grigg
iang@systemics.com
Sun, 27 Aug 2000 18:45:59 -0400
There was an improvement after the last lib that Jeroen made
was committed (he found some failing ElGamal tests that slowed
him down...).
The double stripping and armouring and de-armouring and stripping
test now passes with narry a grunt, save lots of diags.
Thanks for that Edwin!
However, I'm now getting a PGPSignaturePacket NPE:
Exception occurred during event dispatching:
java.lang.NullPointerException:
at cryptix.openpgp.util.PGPMPI.encode(PGPMPI.java:117)
at cryptix.openpgp.algorithm.PGPDSA.encodeSignatureData(PGPDSA.java:422)
at cryptix.openpgp.packet.PGPSignaturePacket.setData(PGPSignaturePacket.
java:163)
at cryptix.openpgp.PGPSecretKey.initSign(PGPSecretKey.java:228)
at cryptix.openpgp.PGPMessage.clearSign(PGPMessage.java:55)
at webfunds.client.contracts.wizard.FinishSig.next(FinishSig.java:392)
at webfunds.client.contracts.wizard.Wizard$MySelectionModel.setSelection
Paths(Wizard.java:347)
where the code looks like this in FinishSig:
// put the contract together
String all = data.getUnsignedContract();
all = all + "\r\n[keys]";
all = all + "\r\n\r\nkeys_contract='\r\n\r\n";
all = all + data.getPublicContractKey();
all = all + "\r\n'\r\n\r\nkeys_certification='\r\n\r\n";
all = all + data.getTopLevelKey();
all = all + "\r\n'\r\n\r\nkeys_server_certification='\r\n\r\n";
all = all + data.getOperatorKey();
all = all + "\r\n'\r\n\r\n[signatures]\r\n";
// write the unsigned contract
String unsignedName = txtFileUnsigned.getText();
tryWriting(unsignedName, "unsigned contract", all);
try {
// prepare and sign contract
String signedContract = PGPMessage.clearSign(all, skey);
Last line PGPMessage.clearSign(all, skey); is the 392 in FinishSig.
data in all (as written out by tryWriting()) is at
http://www.iang.net/g
key is at:
http://www.iang.net/contract.pub
http://www.iang.net/contract.sec
password is moopoo100
Enjoy! We are very close! I haven't committed my wizard stuff as
it's not working yet, but is very nearly so..... Sorry for the
hack and burn, but I need to add the recover keys feature from
contract, and I'm nearly there.....
--
iang