• smime_timeout max of 2^16 = 32768

    From bjarthur70@gmail.com@21:1/5 to All on Sat Jun 16 09:26:23 2018
    is the limit of ~9 hrs on caching your smime keyphrase due to mutt or openssl or something else? i would prefer this to be much longer.

    relatedly, if i accidentally mistype my smime passphrase, why does mutt not ask me to enter it again. this is what it does for gpg.

    thanks.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Eike Rathke@21:1/5 to All on Sat Jun 16 19:36:30 2018
    * bjarthur70@gmail.com, 2018-06-16 16:26 UTC:
    is the limit of ~9 hrs on caching your smime keyphrase due to mutt or openssl or something else?

    It's the maximum value of a 16-bit signed integer, and defined as such
    in Mutt.

    Eike

    --
    OpenPGP/GnuPG encrypted mail preferred in all private communication.
    GPG key 0x6A6CD5B765632D3A - 2265 D7F3 A7B0 95CC 3918 630B 6A6C D5B7 6563 2D3A Care about Free Software, support the FSFE https://fsfe.org/support/?erack
    Use LibreOffice! https://www.libreoffice.org/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bjarthur70@gmail.com@21:1/5 to All on Sat Jun 16 20:07:31 2018
    if defined as such in mutt, then it would be relatively straightforward to change it to a unsigned 32-bit integer. are there any developers here that could comment on whether they'd be amenable to such a change?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Eike Rathke@21:1/5 to All on Sun Jun 17 22:05:30 2018
    * bjarthur70@gmail.com, 2018-06-17 03:07 UTC:
    if defined as such in mutt, then it would be relatively straightforward to change it to a unsigned 32-bit integer.

    I love it when someone not familiar with a code says "it would be
    relatively straightforward" ... browsing related source revealed

    a) the timeout is added to a time_t, unsigned 32-bit couldn't be because
    time_t may be signed 32-bit on some systems
    b) suddenly the realms of possible overflows are entered
    c) the options parser isn't prepared to handle 32-bit numbers (simply
    all numeric options are short)

    So, it's not just changing the type of a variable.

    Eike

    --
    OpenPGP/GnuPG encrypted mail preferred in all private communication.
    GPG key 0x6A6CD5B765632D3A - 2265 D7F3 A7B0 95CC 3918 630B 6A6C D5B7 6563 2D3A Care about Free Software, support the FSFE https://fsfe.org/support/?erack
    Use LibreOffice! https://www.libreoffice.org/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bjarthur70@gmail.com@21:1/5 to All on Sun Jun 17 16:13:12 2018
    sorry, didn't mean to offend. by "relatively" i meant that openssl wouldn't need to be modified too.

    as it stands now, smime in mutt is not useable for me. i'm simply not willing to type in my password every 9 hrs. particularly if it's the case that if i mistype it, i have to completely quit out of mutt, and then retype all my passwords in again, not
    just smime's.

    just trying to make mutt better with a couple suggestions from an otherwise avid user.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jorgen Grahn@21:1/5 to Eike Rathke on Mon Jun 18 06:57:44 2018
    On Sun, 2018-06-17, Eike Rathke wrote:
    * bjarthur70@gmail.com, 2018-06-17 03:07 UTC:

    if defined as such in mutt, then it would be relatively
    straightforward to change it to a unsigned 32-bit integer.

    I love it when someone not familiar with a code says "it would be
    relatively straightforward" ...

    Outsiders are often best at spotting absurd limitations,
    so I love it too ... although perhaps in a different sense.

    browsing related source revealed

    a) the timeout is added to a time_t, unsigned 32-bit couldn't be because
    time_t may be signed 32-bit on some systems
    b) suddenly the realms of possible overflows are entered

    You're making it sound harder than it is.

    c) the options parser isn't prepared to handle 32-bit numbers (simply
    all numeric options are short)

    Sounds odd; Unix software almost never uses short for stuff like that.

    I haven't looked at the code (or at the use case) but IMO timeouts are
    best supplied as hh:mm:ss, or some similar syntax which doesn't force
    you to specify 9 hours as 32400. Would be nice to allow "9:00:00" or
    "9h".

    I'm tempted to submit a patch, but I don't use S/MIME myself.
    I have a 'set pgp_timeout = 3600' line in my .muttrc though ...

    So, it's not just changing the type of a variable.

    Agreed. But it's pretty fair to expect that it /would/ be.

    /Jorgen

    --
    // Jorgen Grahn <grahn@ Oo o. . .
    \X/ snipabacken.se> O o .

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Eike Rathke@21:1/5 to All on Mon Jun 18 08:08:11 2018
    * Jorgen Grahn, 2018-06-18 06:57 UTC:
    On Sun, 2018-06-17, Eike Rathke wrote:
    browsing related source revealed
    [...]

    You're making it sound harder than it is.

    I just was pointing out why it's not just a "straightforward" change to unsigned 32-bit.

    c) the options parser isn't prepared to handle 32-bit numbers (simply
    all numeric options are short)

    Sounds odd; Unix software almost never uses short for stuff like that.

    Probably there was no need to use anything else than short so far.

    I haven't looked at the code (or at the use case) but IMO timeouts are
    best supplied as hh:mm:ss, or some similar syntax which doesn't force
    you to specify 9 hours as 32400. Would be nice to allow "9:00:00" or
    "9h".

    I find specifying timeouts in seconds here quite natural. After all,
    it's a timeout that usually is in the range of minutes or an hour, IMHO (personally I regard a passphrase timeout larger than hours as
    undesirable, but YMMV).

    I'm tempted to submit a patch, but I don't use S/MIME myself.
    I have a 'set pgp_timeout = 3600' line in my .muttrc though ...

    It's the same for pgp_timeout.

    So, it's not just changing the type of a variable.

    Agreed. But it's pretty fair to expect that it /would/ be.

    User assumptions (not expectations) might make me a little sarcastic sometimes..

    Eike

    --
    OpenPGP/GnuPG encrypted mail preferred in all private communication.
    GPG key 0x6A6CD5B765632D3A - 2265 D7F3 A7B0 95CC 3918 630B 6A6C D5B7 6563 2D3A Care about Free Software, support the FSFE https://fsfe.org/support/?erack
    Use LibreOffice! https://www.libreoffice.org/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Eike Rathke@21:1/5 to All on Mon Jun 18 07:46:45 2018
    * bjarthur70@gmail.com, 2018-06-17 23:13 UTC:
    sorry, didn't mean to offend. by "relatively" i meant that openssl wouldn't need to be modified too.

    OpenSSL isn't involved here.

    as it stands now, smime in mutt is not useable for me. i'm simply not willing to type in my password every 9 hrs.

    "Not useable" because you have to enter a passphrase every 9 hours? c'mon..

    particularly if it's the case that if i mistype it, i have to completely quit out of mutt,

    No, you don't, simply hit Ctrl+F to forget passphrases.

    and then retype all my passwords in again, not just smime's.

    Yes.

    Anyway, I created https://gitlab.com/muttmua/mutt/merge_requests/20

    Eike

    --
    OpenPGP/GnuPG encrypted mail preferred in all private communication.
    GPG key 0x6A6CD5B765632D3A - 2265 D7F3 A7B0 95CC 3918 630B 6A6C D5B7 6563 2D3A Care about Free Software, support the FSFE https://fsfe.org/support/?erack
    Use LibreOffice! https://www.libreoffice.org/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ian Zimmerman@21:1/5 to Jorgen Grahn on Mon Jun 18 08:14:50 2018
    On 2018-06-18 06:57, Jorgen Grahn wrote:

    c) the options parser isn't prepared to handle 32-bit numbers (simply
    all numeric options are short)

    Sounds odd; Unix software almost never uses short for stuff like that.

    It isn't conventional to use unsgined types (of any size) for "stuff
    like that" either. unsigned is for bit fields.

    --
    Please don't Cc: me privately on mailing lists and Usenet,
    if you also post the followup to the list or newsgroup.
    To reply privately _only_ on Usenet and on broken lists
    which rewrite From, fetch the TXT record for no-use.mooo.com.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jorgen Grahn@21:1/5 to Ian Zimmerman on Mon Jun 18 18:14:31 2018
    On Mon, 2018-06-18, Ian Zimmerman wrote:
    On 2018-06-18 06:57, Jorgen Grahn wrote:

    c) the options parser isn't prepared to handle 32-bit numbers (simply
    all numeric options are short)

    Sounds odd; Unix software almost never uses short for stuff like that.

    It isn't conventional to use unsgined types (of any size) for "stuff
    like that" either. unsigned is for bit fields.

    I was thinking plain int is the default type; I didn't mention
    unsigned. Are you mocking my choice of words, by the way?

    /Jorgen

    --
    // Jorgen Grahn <grahn@ Oo o. . .
    \X/ snipabacken.se> O o .

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From bjarthur70@gmail.com@21:1/5 to All on Tue Jun 19 04:10:02 2018
    thanks for submitting the PR! hope you have time to make sure it is merged.

    thanks also for pointing out that ctrl-F wipes passphrases from memory! nice to see that it doesn't wipe passwords too.

    i still find mutt's handling of gpg passphrases better though: it simply doesn't store them if there is an error, and asks you to re-enter them.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ian Zimmerman@21:1/5 to Jorgen Grahn on Tue Jun 19 08:40:15 2018
    On 2018-06-18 18:14, Jorgen Grahn wrote:

    It isn't conventional to use unsgined types (of any size) for "stuff
    like that" either. unsigned is for bit fields.

    I was thinking plain int is the default type; I didn't mention
    unsigned.

    Right; my post was also a reaction to something upthread, which I should
    have cited.

    Are you mocking my choice of words, by the way?

    No, I was tired and couldn't quickly come up with a better way to say
    it. Even though I knew there was a better way, and that's why the quotes.

    --
    Please don't Cc: me privately on mailing lists and Usenet,
    if you also post the followup to the list or newsgroup.
    To reply privately _only_ on Usenet and on broken lists
    which rewrite From, fetch the TXT record for no-use.mooo.com.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jorgen Grahn@21:1/5 to Ian Zimmerman on Wed Jun 20 05:38:19 2018
    On Tue, 2018-06-19, Ian Zimmerman wrote:
    On 2018-06-18 18:14, Jorgen Grahn wrote:

    It isn't conventional to use unsgined types (of any size) for "stuff
    like that" either. unsigned is for bit fields.

    I was thinking plain int is the default type; I didn't mention
    unsigned.

    Right; my post was also a reaction to something upthread, which I should
    have cited.

    Yes, the OP wrote uint32 or something. That was overspecified, IMO.

    Are you mocking my choice of words, by the way?

    No, I was tired and couldn't quickly come up with a better way to say
    it. Even though I knew there was a better way, and that's why the quotes.

    Ah, good. BTW, my "stuff like that" came by in a similar way; I knew
    there was a more precise way to say it, but didn't know how much time
    I'd need to find it.

    /Jorgen

    --
    // Jorgen Grahn <grahn@ Oo o. . .
    \X/ snipabacken.se> O o .

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Eike Rathke@21:1/5 to All on Wed Jun 20 08:32:02 2018
    * bjarthur70@gmail.com, 2018-06-19 11:10 UTC:
    thanks for submitting the PR! hope you have time to make sure it is merged.

    A second incarnation is in, https://gitlab.com/muttmua/mutt/commit/4bc76c2f3d425a95b30b06cc73cb7c73f34f26db

    i still find mutt's handling of gpg passphrases better though: it simply doesn't store them if there is an error, and asks you to re-enter them.

    File an issue if you want something getting changed, https://gitlab.com/muttmua/mutt/issues

    Eike

    --
    OpenPGP/GnuPG encrypted mail preferred in all private communication.
    GPG key 0x6A6CD5B765632D3A - 2265 D7F3 A7B0 95CC 3918 630B 6A6C D5B7 6563 2D3A Care about Free Software, support the FSFE https://fsfe.org/support/?erack
    Use LibreOffice! https://www.libreoffice.org/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)