[Webfunds-devel] SCW ... unexpected self-sign reject

Ian Grigg iang@systemics.com
Sun, 27 Aug 2000 09:05:38 -0400


I've modified SCW to do the sanity checks as described in the
commits - especially the stripping of surplus keys that is
now essential to move forward.  Essentially, it involved
adding a bunch of utility functions into KeyPanel and changing
the logic so that KeyContract does some of the work itself.

(I've also done some more on the doco stuff ...  Sorry, Edwin,
I had to fiddle with the Swing params to get that pretty again...)

Now, however, another bug is there:  the [contract] key gets
rejected by verify as not being self-signed.  But, it looks good,
it got stripped, and gpg and pgp5 both agree it is self signed...

Full stack trace is at the end, including some printed diags
including the *stripped* key which is rejected.  The rejecting
code is CertificateFactory generated Certificate which is then
used to extract a key and checked against itself;  all in
ricardian.Contract.java.

If someone can look at this I'd be most grateful...  (I have
updated the lib dir and other dirs).  Meanwhile, I'm going to
look at upgrading the storage of the contract from SCW so that
DJ can sign in pgp6.5 . . .

-- 
iang



reading local properties
     Cons; Ricardian Contracts directory is user/contract
     Cons; Reading Contracts.
     Cons; Read from user/contract into user/contract
     Cons; skipping junk
     Cons; Name nHyee7VkIkl3rqhnRiOjdAe49u4.asc: 
     Cons;    9c7c9e7bb5 grams of g nHyee7VkIk 9c7c9e7bb5 
     Cons; resaving
     Cons; skipping nHyee7VkIkl3rqhnRiOjdAe49u4.loc
     Cons; skipping nHyee7VkIkl3rqhnRiOjdAe49u4.fuz
     Cons; Cleanup Contracts.
     Cons; nHyee7VkIkl3rqhnRiOjdAe49u4.asc; 
 DB: (no v1) user/data2  v2 

  CONVERT v2
  5 stores to convert:
    converting = user/data2/WalletManager/SOX/Receipts/e4e3005afd457eb03bb2297d79dfd159c3f6ddb5...    end.
    converting = user/data2/WalletManager/SOX/Receipts/30f8b977a49ea8fe02993128176d90ae5b0565ac...    end.
    converting = user/data2/WalletManager/SOX/Receipts/b038a5165b15a6e6f70245038625e94361853110...    end.
    converting = user/data2/WalletManager/SOX/Receipts/4ed7f19b0bf01f720e27b9389e2228fb3cfdf05c...    end.
    converting = user/data2/WalletManager/SOX/Receipts/20ceb59a3a91739ed6161ccdb448be8c583e1845...    end.
  END CONVERT
DB done.
 CoreParts: multi address browser   AB: windows
  AB: JMenuBar
  AB: JToolBar
  AB: initAction:
  AB:             1
  AB:             W
  AB:             A
  AB:             S
  AB:             I
  AB:             i
  AB:             -
  AB: wallet hashtables
  AB: AccountBrowserImpl ready!
wallets plugins set.
 Plugins: 
   + + + + + + webfunds.client.SimplePaymentFrame + + + + + + 
    PM+ trying webfunds.client.SimplePaymentFrame
    PM+ TL Class is class webfunds.client.SimplePaymentFrame
   + + + + + + webfunds.client.SimpleDepositFrame + + + + + + 
    PM+ trying webfunds.client.SimpleDepositFrame
    PM+ TL Class is class webfunds.client.SimpleDepositFrame
   + + + + + + webfunds.client.contracts.ContractBrowser + + + + + + 
    PM+ trying webfunds.client.contracts.ContractBrowser
    PM+ TL Class is class webfunds.client.contracts.ContractBrowser
   + + + + + + webfunds.client.SignContractWizard + + + + + + 
    PM+ trying webfunds.client.SignContractWizard
    PM+ TL Class is class webfunds.client.SignContractWizard
 ++++++++++++++++ plugged ++++++++++++++++
    PM+ plugged() with 4 plugins
  AB: offered 4 plugins
  AB: adding PluginInfo for: webfunds.client.SimplePaymentFrame
  AB: CONTRACT Pay; class webfunds.client.plugins.PluginInfo
  AB: adding PluginInfo for: webfunds.client.SimpleDepositFrame
  AB: ACCOUNT Deposit
  AB: adding PluginInfo for: webfunds.client.contracts.ContractBrowser
  AB: CONTRACT View Contract; class webfunds.client.plugins.PluginInfo
  AB: GENERAL ContractBrowser
  AB: adding PluginInfo for: webfunds.client.SignContractWizard
  AB: GENERAL SignContractWizard
 Wallets: SOX - - - - - - - - - - - - - - - - - - - - - - -
WM instantiating webfunds.client.sox.SOXWallet
WM debug
v2 init() user/data2/WalletManager/SOX/SOXServers
v2 4 files
v2 initialise AFS from 20.ron
v2 looking to cleanup before 18
v2 Look 20.ron: 
v2 Look 21.ron: 
v2 Look 17.ron: 
v2 deleted: user/data2/WalletManager/SOX/SOXServers/17.ron
v2 Look 18.ron: 
v2 deleting next time: 18
v2 Look 19.ron: 
[sox] server_name = gutenberg
     ssS: adding to local: gutenberg
[sox] server_name = gutenberg
     ssS:  name: http://webfunds.org/ricardo/gutenberg
     ssS:  name: gutenberg
     ssS:  name: http://systemics.com/ricardo/hayek/gutenberg
[sox] server_name = Denationalisation
     ssS: adding to local: Denationalisation
[sox] server_name = Denationalisation
     ssS:  name: http://webfunds.org/ricardo/hayek_ai
     ssS:  name: http://systemics.com/ricardo/hayek/server
     ssS:  name: Denationalisation
     ssS: SOXServerStore Open!
Trying to get 'Accounts' store
  We got: SepFileStore v1: user/data2/WalletManager/SOX/Accounts, with size: 4
  AB: wallets now set: 1
          Mkt - - - - - - - - - - - - - - - - - - - - - - -
WM instantiating systemics.trader.MarketWallet
java.lang.ClassNotFoundException: systemics.trader.MarketWallet
        at java.beans.Beans.instantiate(Beans.java:115)
        at webfunds.client.WalletManager.addWallet(WalletManager.java:55)
        at webfunds.client.Core.<init>(Core.java:250)
        at webfunds.client.Core.main(Core.java:596)
 wallets open. ============================================
 

 + + + + + + Run Now! + + + + + + 

  AB: cs...
  AB: ui...
  AB: bug...
  AB: root...
  AB: model...
  SW: Retrieved 4 accounts
getting...
<>get e4e3005afd457eb03bb2297d79dfd159c3f6ddb5
<>converting [] 826 bytes
  SW: Ac test_hayek : 1 items!
  SW:       ItemId: 9c7c9e7bb564224977aea8674623a37407b8f6ee
    got...
    0 ItemId: 9c7c9e7bb564224977aea8674623a37407b8f6ee
getting...
<>get b038a5165b15a6e6f70245038625e94361853110
<>converting [] 822 bytes
  SW: Ac test 2 : 1 items!
  SW:       ItemId: 8da7e5d67d2ca471f835c713333b55229c919962
    got...
    0 ItemId: 8da7e5d67d2ca471f835c713333b55229c919962
getting...
<>get 30f8b977a49ea8fe02993128176d90ae5b0565ac
<>converting [] 828 bytes
  SW: Ac test_openpgp : 1 items!
  SW:       ItemId: 8da7e5d67d2ca471f835c713333b55229c919962
    got...
    0 ItemId: 8da7e5d67d2ca471f835c713333b55229c919962
getting...
<>get 4ed7f19b0bf01f720e27b9389e2228fb3cfdf05c
<>converting [] 818 bytes
  SW: Ac tt2 : 1 items!
  SW:       ItemId: 3fbbf086e953969714b819751ef04ee2328ee26e
    got...
    0 ItemId: 3fbbf086e953969714b819751ef04ee2328ee26e
got!
  AB: table...
JTT.
4
7
9
JTT!
  AB: acr...
  AB: set...
  AB: vis...
  AB: getCP...
  AB: setLay...
  AB: setEd...
  AB: frame...
done: webfunds.client.Core@50e02bc
CONTRACT -----------
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: Cryptix OpenPGP

mQGiBDmaE9sRBADTRBghpkmbe6VMDZpJ6MT78jAQayOrAB8VyuuO5sYrou7HBUWv
urpi6y3CrtMb+msgzIOCrKfcLkgr9DUk78SJCOkYyE3O95pIBgtNr3zbbkiauXCh
YJTvm1FXUbL4XlEBT5VaBqDkEtYg8p16eIDIcIrpeX2x722u0BFRAx9V5wCggPT/
PDoWOEu8Fc4S6r953fuI0CcEAJ+Pl22i0n++/AJ9NhvPotsqGziUNcmAYKDSM9tY
QDIMW5DPV3Z/+EE+X3jo5VsJMtwboKJiDbjl7xj/jLRW+CZD2Rfb7tQe8aSRJuLU
1kTOmRKdQx6GLhOQV6orQWur7MfudnOaHNTlHTxKMvT5nCl/l2BZOPFKryzPrLBp
fiOHA/0fSnfXFZ4uExpxb4DzWQzWhUNIGd3y8fou2OjTf+RQbT1POaAfPaR0K1ac
KcXohqBHjspiP6TCGC1bnD6ECg7NnJWlvr6aRK0a02OqCjZrHYHX3OwwFQHGtptk
4CjO2VxANOKPuZ30zkGF2KvVgVE+Gf9qHIQ2J9PFq/uPwhqcN7QhaWFuZyBbY29u
dHJhY3RdICh0ZXN0IGtleSkgPGlhbmc+iFYEExECABYFAjmaE9sECwoEAwMVAwID
FgIBAheAAAoJEIuqDmk3guyrJTgAn0H0JBaXqwsrDhRVFkZpapOCEW0XAJkBjTO3
o/PWuCe5RkNo4Q0b6E/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J
nX8R9mzwFerSsaOfuQz6RyAyAKCz1XrCpCKeAxWVxw8/xEUFYcNKrw==
=OpbW
-----END PGP PUBLIC KEY BLOCK-----

(original) - - - -



-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: Cryptix OpenPGP


mQGiBDmaE9sRBADTRBghpkmbe6VMDZpJ6MT78jAQayOrAB8VyuuO5sYrou7HBUWv
urpi6y3CrtMb+msgzIOCrKfcLkgr9DUk78SJCOkYyE3O95pIBgtNr3zbbkiauXCh
YJTvm1FXUbL4XlEBT5VaBqDkEtYg8p16eIDIcIrpeX2x722u0BFRAx9V5wCggPT/
PDoWOEu8Fc4S6r953fuI0CcEAJ+Pl22i0n++/AJ9NhvPotsqGziUNcmAYKDSM9tY
QDIMW5DPV3Z/+EE+X3jo5VsJMtwboKJiDbjl7xj/jLRW+CZD2Rfb7tQe8aSRJuLU
1kTOmRKdQx6GLhOQV6orQWur7MfudnOaHNTlHTxKMvT5nCl/l2BZOPFKryzPrLBp
fiOHA/0fSnfXFZ4uExpxb4DzWQzWhUNIGd3y8fou2OjTf+RQbT1POaAfPaR0K1ac
KcXohqBHjspiP6TCGC1bnD6ECg7NnJWlvr6aRK0a02OqCjZrHYHX3OwwFQHGtptk
4CjO2VxANOKPuZ30zkGF2KvVgVE+Gf9qHIQ2J9PFq/uPwhqcN7QhaWFuZyBbY29u
dHJhY3RdICh0ZXN0IGtleSkgPGlhbmc+iFYEExECABYFAjmaE9sECwoEAwMVAwID
FgIBAheAAAoJEIuqDmk3guyrJTgAn2kJnX8R9mzwFerSsaOfuQz6RyAyAKCz1XrC
pCKeAxWVxw8/xEUFYcNKr4hGBBARAgAGBQI5pyoaAAoJEE7NkgBFeQ1X2XUAn2kJ
nX8R9mzwFerSsaOfuQz6RyAyAKCz1XrCpCKeAxWVxw8/xEUFYcNKrw==
=OpbW
-----END PGP PUBLIC KEY BLOCK-----





(rearmoured key) -----

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: Cryptix OpenPGP

mQGiBDmaE9sRBADTRBghpkmbe6VMDZpJ6MT78jAQayOrAB8VyuuO5sYrou7HBUWv
urpi6y3CrtMb+msgzIOCrKfcLkgr9DUk78SJCOkYyE3O95pIBgtNr3zbbkiauXCh
YJTvm1FXUbL4XlEBT5VaBqDkEtYg8p16eIDIcIrpeX2x722u0BFRAx9V5wCggPT/
PDoWOEu8Fc4S6r953fuI0CcEAJ+Pl22i0n++/AJ9NhvPotsqGziUNcmAYKDSM9tY
QDIMW5DPV3Z/+EE+X3jo5VsJMtwboKJiDbjl7xj/jLRW+CZD2Rfb7tQe8aSRJuLU
1kTOmRKdQx6GLhOQV6orQWur7MfudnOaHNTlHTxKMvT5nCl/l2BZOPFKryzPrLBp
fiOHA/0fSnfXFZ4uExpxb4DzWQzWhUNIGd3y8fou2OjTf+RQbT1POaAfPaR0K1ac
KcXohqBHjspiP6TCGC1bnD6ECg7NnJWlvr6aRK0a02OqCjZrHYHX3OwwFQHGtptk
4CjO2VxANOKPuZ30zkGF2KvVgVE+Gf9qHIQ2J9PFq/uPwhqcN7QhaWFuZyBbY29u
dHJhY3RdICh0ZXN0IGtleSkgPGlhbmc+iFYEExECABYFAjmaE9sECwoEAwMVAwID
FgIBAheAAAoJEIuqDmk3guyrJTgAn2kJnX8R9mzwFerSsaOfuQz6RyAyAKCz1XrC
pCKeAxWVxw8/xEUFYcNKr4hGBBARAgAGBQI5pyoaAAoJEE7NkgBFeQ1X2XUAn2kJ
nX8R9mzwFerSsaOfuQz6RyAyAKCz1XrCpCKeAxWVxw8/xEUFYcNKrw==
=OpbW
-----END PGP PUBLIC KEY BLOCK-----



(11) Bad Contract Signing Key: webfunds.ricardian.ContractException: OpenPGP cert <contract> not self-signed - java.security.SignatureException: Not all userIds are signed with the given key.
        at webfunds.ricardian.Contract.getOpenPGPCertFromString(Contract.java:894)
        at webfunds.ricardian.Contract.getCertFromString(Contract.java:837)
        at webfunds.ricardian.Contract.getCert(Contract.java:800)
        at webfunds.ricardian.Contract.getContractCert(Contract.java:732)
        at webfunds.ricardian.Contract.verifyOpenPGPSignatures(Contract.java:990)
        at webfunds.ricardian.Contract.verifyContract(Contract.java:955)
        at webfunds.client.contracts.wizard.FinishSig.sanityCheckContract(FinishSig.java:446)
        at webfunds.client.contracts.wizard.FinishSig.next(FinishSig.java:422)
        at webfunds.client.contracts.wizard.Wizard$MySelectionModel.setSelectionPaths(Wizard.java:347)
        at javax.swing.JTree.setSelectionPaths(JTree.java:993)
        at javax.swing.JTree.setSelectionRows(JTree.java:1028)
        at javax.swing.JTree.setSelectionRow(JTree.java:1005)
        at webfunds.client.contracts.wizard.Wizard.actionPerformed(Wizard.java:253)
        at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1066)
        at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1101)
        at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:378)
        at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:250)
        at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:204)
        at java.awt.Component.processMouseEvent(Component.java:2358)
        at java.awt.Component.processEvent(Component.java:2203)
        at java.awt.Container.processEvent(Container.java:901)
        at java.awt.Component.dispatchEventImpl(Component.java:1812)
        at java.awt.Container.dispatchEventImpl(Container.java:946)
        at java.awt.Component.dispatchEvent(Component.java:1744)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:1841)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:1630)
        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:1531)
        at java.awt.Container.dispatchEventImpl(Container.java:933)
        at java.awt.Window.dispatchEventImpl(Window.java:509)
        at java.awt.Component.dispatchEvent(Component.java:1744)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:79)