From pssh at richardfearn.co.uk Sun Jan 1 21:31:48 2006 From: pssh at richardfearn.co.uk (Rich Fearn) Date: Sun Jan 1 21:31:55 2006 Subject: [pssh-users] Re: unable to import rsa or dsa key Message-ID: <000b01c60f44$aedcb350$0102020a@home.rdf> Hi, I've been looking into the problem that a couple of people had back in June/July 2005, where they would get the message: "Incorrect passphrase, or incorrectly formatted memo" when trying to import a public key. The messages can be viewed in the pssh-users archive: http://six.pairlist.net/pipermail/pssh-users/2005-June/thread.html http://six.pairlist.net/pipermail/pssh-users/2005-July/thread.html I encountered this problem too, and have managed to find the cause. A patch for the 2005_06_23 source code is attached that fixes the problem. The problem is caused by pssh incorrectly dealing with private records. The effect is that if you select a memo, it's quite possible that pssh is reading the contents of an entirely different memo, which accounts for the "Incorrect passphrase..." message. There are three sections of code that contribute to the problem. pssh always opens the memo database without the "dmModeShowSecret" flag, and then searches through the database using the "category" functions (such as DmQueryNextInCategory), meaning that private records are never retrieved from the database. However, elsewhere in the code, the RecordListCount function calls DmNumRecords to determine how many items to show in the memo list, thus counting *all* records in the database (including private records). There is therefore a mismatch between the number of records that the list thinks it will be displaying, and how many (non-private) records it will actually be able to retrieve from the database. Two of the three changes address this. Firstly, the database is opened with or without the "dmModeShowSecret" flag, depending on whether private records should be shown/masked/hidden (set in the global Palm preferences). Secondly, the RecordListCount function now uses DmNumRecordsInCategory, which includes or excludes private records as appropriate depending on how the database is opened. These first two changes mean that private memos are only displayed in the list if private records are set to be shown in the global Palm preferences; and the memo list's size is now determined correctly. There is also a problem in the RecordListRepopulate function, which determines the records to be displayed in the list. The current version of the code doesn't jump to the correct record before taking the next 10 items to display. It's a tricky problem to explain; I would be happy to provide an explanation if anyone is *really* interested. :-) (The symptom of this problem on my Palm was that the list sometimes wasn't scrolling when I pressed the down scroll arrow.) The third change addresses this problem. I've managed to successfully compile a new PRC using Cygwin. I can provide instructions on how to set up the build environment if anyone is interested. Richard Fearn -------------- next part -------------- A non-text attachment was scrubbed... Name: memolist.patch Type: application/octet-stream Size: 2392 bytes Desc: not available Url : http://six.pairlist.net/pipermail/pssh-users/attachments/20060102/1ed19ea6/memolist.obj From pssh at richardfearn.co.uk Mon Jan 2 06:14:38 2006 From: pssh at richardfearn.co.uk (Rich Fearn) Date: Mon Jan 2 06:14:40 2006 Subject: [pssh-users] Re: unable to import rsa or dsa key Message-ID: <001301c60f8d$b8d17d20$0102020a@home.rdf> > I've been looking into the problem that a couple of people had back in > June/July 2005, where they would get the message: > "Incorrect passphrase, or incorrectly formatted memo" > when trying to import a public key. Sorry - I forgot to mention that there is a workaround for this problem. If your public key memo is the very first memo (when viewed in the Memo application), you shouldn't get this problem. There are two ways of doing this: If you have the sort order for the Memo application set to "Alphabetic", add a few characters to the start of the public key name (on the first line of the memo) so that it is placed before all other memos. (Adding "000" to the start of the memo, for example, should do this; it depends on what the other memos on your Palm are called.) Alternatively, if the sort order is set to "Manual", drag the memo (while in the Memo application) to the top of the list. When you import the key in pssh, your public key memo should appear at the top of the list, and you shouldn't get the error. Richard Fearn From rm-throwaway4 at gunlab.com.ru Tue Jan 31 10:40:50 2006 From: rm-throwaway4 at gunlab.com.ru (Roman V. Isaev) Date: Tue Jan 31 10:40:54 2006 Subject: [pssh-users] font files Message-ID: <20060131154050.GL5283@isaev.ru> How to edit .font files in rsrc directory? Is there any tool to do it? -- Roman V. Isaev http://www.soprano-recorder.ru Moscow, Russia