[PATCH] test: initial tests for smime

2015-01-17 Thread David Bremner
Jameson Graef Rollins writes: > For some reason PATCH 3/4 no longer applies after substituting in this > patch as PATCH 1/4. Ah, I guess I need to send the whole series again. > > But do we really need to test the message output of openssl? It seems > like it's broken, and if it ever gets

[PATCH] test: initial tests for smime

2015-01-17 Thread David Bremner
Test the ability of notmuch-mua-mail to send smime signed messages; this really relies on existing functionality in message-mode. The dependency on openssl to generate keys seems acceptable since that's the method I got to work for smime signing in emacs. --- Hey Jamie; It was kindof my fault:

[PATCH v3 5/5] Update documentation

2015-01-17 Thread David Bremner
Todd writes: > + The new `mimetype:` search prefix allows searching for the > + content-type of attachments, which is now indexed by `notmuch > + insert`. See the `notmuch-search-terms` manual page for detai it strikes me as odd to single out notmuch-insert here, since mimetypes are also

[PATCH v3 3/5] Add indexing for the mimetype term

2015-01-17 Thread David Bremner
Todd writes: > Adds the indexing and removes the broken test flag > --- > lib/database.cc| 1 + > lib/index.cc | 10 ++ > test/T190-multipart.sh | 4 > 3 files changed, 11 insertions(+), 4 deletions(-) > > diff --git a/lib/database.cc b/lib/database.cc > index

[PATCH] emacs: convert notmuch-address-harvester to use notmuch-address

2015-01-17 Thread David Bremner
No attempt is made to optimize anything here, just drop in the new command. In particular the use of --output=recipients is known to be slower than --output=senders, but it fit the existing logic better. --- Let us never speak of the parent message again. emacs/notmuch-address.el | 25

DatabaseModifiedErrors causing troubles

2015-01-17 Thread Gaute Hope
Excerpts from David Bremner's message of January 17, 2015 13:29: > Gaute Hope writes: > >> >> Hi David, >> >> Would it be possible with an error code that I could compare against in >> stead? It would then work a bit like a global instance of the gmime >> error. It could even be a preparation

[PATCH] emacs: convert notmuch-address-harvester to use notmuch-address

2015-01-17 Thread David Bremner
No attempt is made to optimize anything here, just drop in the new command. --- In a few subjective tests, this seems quite a bit faster than the version based on notmuch-show emacs/notmuch-address.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/emacs/notmuch-address.el

[PATCH] test: initial tests for smime

2015-01-17 Thread Jameson Graef Rollins
ss we do care about what openssl does to the original message. If not, then I'm still not sure we care. jamie. -- next part -- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 818 bytes Desc: not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20150117/d1fb04bf/attachment.pgp>

[PATCH] test: initial tests for smime

2015-01-17 Thread Jameson Graef Rollins
forget about the rest of openssl's output? jamie. -- next part -- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 818 bytes Desc: not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20150117/efd3351f/attachment.pgp>

[v2 3/3] thread-naming test: Test empty subject names.

2015-01-17 Thread David Bremner
David Bremner writes: > Jesse Rosenthal writes: > >> >> +test_begin_subtest "Use empty subjects if necessary." >> +add_message '[subject]="@FORCE_EMPTY"' \ >> +'[date]="Sat, 13 Jan 2001 15:43:45 -"' \ >> +'[from]="Empty Sender \ > It seems to me we should avoid

DatabaseModifiedErrors causing troubles

2015-01-17 Thread David Bremner
Gaute Hope writes: > > Hi David, > > Would it be possible with an error code that I could compare against in > stead? It would then work a bit like a global instance of the gmime > error. It could even be a preparation step against a gmime-error-style > solution in the far future. > > I am sure

SMIME patches v3, with some tests

2015-01-17 Thread Jameson Graef Rollins
uccessful -Content-Type: text/plain - -This is a test signed message. EOF test_expect_equal_file OUTPUT EXPECTED -- next part -- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 818 bytes Desc: not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20150117/626b95d6/attachment.pgp>

[PATCH v3] emacs: add stash support for git send-email command line

2015-01-17 Thread David Bremner
Jani Nikula writes: > Stash From/To/Cc as --to/--to/--cc, respectively, and Message-Id as > --in-reply-to, suitable for pasting to git send-email command line. > --- > emacs/notmuch-show.el | 38 pushed. and used already ;). d

[PATCH 4/4] debian: Recommend gpgsm for S/MIME support

2015-01-17 Thread David Bremner
From: Jameson Graef Rollins --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index 4bc4cd9..05cd04f 100644 --- a/debian/control +++ b/debian/control @@ -31,7 +31,7 @@ Vcs-Browser:

[PATCH 3/4] test: add S/MIME signature verification test for notmuch CLI

2015-01-17 Thread David Bremner
The test is pretty much cut and paste from the PGP/MIME version, with obvious updates taken from notmuch output. This also requires setting up gpgsm infrastucture. --- test/T355-smime.sh | 49 + test/test-lib.sh | 1 + 2 files changed, 50

[PATCH 2/4] cli: S/MIME verification/decryption support

2015-01-17 Thread David Bremner
From: Jameson Graef Rollins The notmuch-show flags --decrypt and --verify will now also process S/MIME multiparts if encountered. Requires gmime-2.6 and gpgsm. --- crypto.c | 20 notmuch-client.h | 5 +++-- 2 files changed, 23

[PATCH 1/4] test: initial tests for smime

2015-01-17 Thread David Bremner
Test the ability of notmuch-mua-mail to send smime signed messages; this really relies on existing functionality in message-mode. The dependency on openssl to generate keys seems acceptable since that's the method I got to work for smime signing in emacs. --- test/T355-smime.sh | 41

SMIME patches v3, with some tests

2015-01-17 Thread David Bremner
Generating the certs was very much trial and error. The net of a thousand lies may have led me astray a bit in that it may be possible to do this all with gpgsm and avoid the dependency on openssl. On the other hand, some tests is better than no tests.

[PATCH v3 1/5] Add failing unit tests for indexed mime types

2015-01-17 Thread David Bremner
Todd writes: > +test_begin_subtest "search for non-existent mime-type" > +test_subtest_known_broken > +output=$(notmuch search mimetype:non-existent/mime-type | > notmuch_search_sanitize) > +test_expect_equal "$output" "" > + This one is not in fact broken, since the search silently returns

DatabaseModifiedErrors causing troubles

2015-01-17 Thread Gaute Hope
Excerpts from David Bremner's message of December 31, 2014 9:28: > Gaute Hope writes: > >> I can work around this by checking for a NULL pointer returned from >> notmuch_query_search_threads () and re-open the database >> (notmuch_database_close () -> notmuch_database_open ()). But I have no >>

[PATCH v3 3/5] Add indexing for the mimetype term

2015-01-17 Thread Todd
indexed, then: mimetype:application/x-pdf finds only the application/x-pdf mimetype:application/pdf finds only the application/pdf mimetype:pdf finds both of the messages I am fairly sure that this behaviour is a result of the automatic phrasing mentioned above. - Todd DB> d -- next part -- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 818 bytes Desc: not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20150117/d46cb7a9/attachment.pgp>

[DRAFT] New features in Vim interface

2015-01-17 Thread Ian Main
Bartosz Telenczuk wrote: > Dear David, > (CC Ian and Franz) > > > Before Christmas we had a flurry of patches from Ian Main (in copy). I > > think there is some functionality overlap with what you proposed. As far > > as I know Ian has mainly been working on his private fork of the vim > >

[PATCH v1 1/2] lib: Fix potential invalid read past an empty string

2015-01-17 Thread Todd
==22884== ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60168291 at pc 0x7ff6295680e5 bp 0x7fff4ab9aa40 sp 0x7fff4ab9aa08 READ of size 1 at 0x60168291 thread T0 #0 0x7ff6295680e4 in __interceptor_strcmp ??:? #1 0x44763b in _thread_add_message

[PATCH v1 0/2] Fixes for issues discovered with -fsanitize=address

2015-01-17 Thread Todd
I built a copy of notmuch with gcc 4.8's new -fsanitize=address feature and ran the test bench. It pointed out these two issues. Todd (2): lib: Fix potential invalid read past an empty string lib: Fix use after free lib/thread.cc | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-)

[PATCH] test: initial tests for smime

2015-01-17 Thread David Bremner
Test the ability of notmuch-mua-mail to send smime signed messages; this really relies on existing functionality in message-mode. The dependency on openssl to generate keys seems acceptable since that's the method I got to work for smime signing in emacs. --- Hey Jamie; It was kindof my fault:

Re: [DRAFT] New features in Vim interface

2015-01-17 Thread Ian Main
Bartosz Telenczuk wrote: Dear David, (CC Ian and Franz) Before Christmas we had a flurry of patches from Ian Main (in copy). I think there is some functionality overlap with what you proposed. As far as I know Ian has mainly been working on his private fork of the vim client, but

Re: SMIME patches v3, with some tests

2015-01-17 Thread Jameson Graef Rollins
On Sat, Jan 17 2015, David Bremner da...@tethera.net wrote: Generating the certs was very much trial and error. The net of a thousand lies may have led me astray a bit in that it may be possible to do this all with gpgsm and avoid the dependency on openssl. On the other hand, some tests is

Re: [PATCH] test: initial tests for smime

2015-01-17 Thread Jameson Graef Rollins
On Sat, Jan 17 2015, David Bremner da...@tethera.net wrote: It was kindof my fault: my original script add embedded ^M's in it, but this cleverness was messed up somewhere in the patch process. Does this version work for you? For some reason PATCH 3/4 no longer applies after substituting in

Re: [PATCH] test: initial tests for smime

2015-01-17 Thread David Bremner
Jameson Graef Rollins jroll...@finestructure.net writes: For some reason PATCH 3/4 no longer applies after substituting in this patch as PATCH 1/4. Ah, I guess I need to send the whole series again. But do we really need to test the message output of openssl? It seems like it's broken,

Re: [PATCH] test: initial tests for smime

2015-01-17 Thread Jameson Graef Rollins
On Sat, Jan 17 2015, David Bremner da...@tethera.net wrote: But do we really need to test the message output of openssl? It seems like it's broken, and if it ever gets fixed we'll need to change this test. I think it's not so much broken as canonical. There is some discussion in the

Re: [PATCH v3 1/5] Add failing unit tests for indexed mime types

2015-01-17 Thread David Bremner
Todd t...@electricoding.com writes: +test_begin_subtest search for non-existent mime-type +test_subtest_known_broken +output=$(notmuch search mimetype:non-existent/mime-type | notmuch_search_sanitize) +test_expect_equal $output + This one is not in fact broken, since the search silently

[PATCH 4/4] debian: Recommend gpgsm for S/MIME support

2015-01-17 Thread David Bremner
From: Jameson Graef Rollins jroll...@finestructure.net --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index 4bc4cd9..05cd04f 100644 --- a/debian/control +++ b/debian/control @@ -31,7 +31,7 @@ Vcs-Browser:

[PATCH 1/4] test: initial tests for smime

2015-01-17 Thread David Bremner
Test the ability of notmuch-mua-mail to send smime signed messages; this really relies on existing functionality in message-mode. The dependency on openssl to generate keys seems acceptable since that's the method I got to work for smime signing in emacs. --- test/T355-smime.sh | 41

[PATCH 2/4] cli: S/MIME verification/decryption support

2015-01-17 Thread David Bremner
From: Jameson Graef Rollins jroll...@finestructure.net The notmuch-show flags --decrypt and --verify will now also process S/MIME multiparts if encountered. Requires gmime-2.6 and gpgsm. --- crypto.c | 20 notmuch-client.h | 5 +++-- 2 files changed, 23

[PATCH 3/4] test: add S/MIME signature verification test for notmuch CLI

2015-01-17 Thread David Bremner
The test is pretty much cut and paste from the PGP/MIME version, with obvious updates taken from notmuch output. This also requires setting up gpgsm infrastucture. --- test/T355-smime.sh | 49 + test/test-lib.sh | 1 + 2 files changed, 50

Re: [PATCH v3] emacs: add stash support for git send-email command line

2015-01-17 Thread David Bremner
Jani Nikula j...@nikula.org writes: Stash From/To/Cc as --to/--to/--cc, respectively, and Message-Id as --in-reply-to, suitable for pasting to git send-email command line. --- emacs/notmuch-show.el | 38 pushed. and used already ;). d

Re: DatabaseModifiedErrors causing troubles

2015-01-17 Thread Gaute Hope
Excerpts from David Bremner's message of December 31, 2014 9:28: Gaute Hope e...@gaute.vetsj.com writes: I can work around this by checking for a NULL pointer returned from notmuch_query_search_threads () and re-open the database (notmuch_database_close () - notmuch_database_open ()). But I

Re: DatabaseModifiedErrors causing troubles

2015-01-17 Thread David Bremner
Gaute Hope e...@gaute.vetsj.com writes: Hi David, Would it be possible with an error code that I could compare against in stead? It would then work a bit like a global instance of the gmime error. It could even be a preparation step against a gmime-error-style solution in the far future.

Re: [v2 3/3] thread-naming test: Test empty subject names.

2015-01-17 Thread David Bremner
David Bremner da...@tethera.net writes: Jesse Rosenthal jrosent...@jhu.edu writes: +test_begin_subtest Use empty subjects if necessary. +add_message '[subject]=@FORCE_EMPTY' \ +'[date]=Sat, 13 Jan 2001 15:43:45 -' \ +'[from]=Empty Sender

[PATCH] emacs: convert notmuch-address-harvester to use notmuch-address

2015-01-17 Thread David Bremner
No attempt is made to optimize anything here, just drop in the new command. --- In a few subjective tests, this seems quite a bit faster than the version based on notmuch-show emacs/notmuch-address.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/emacs/notmuch-address.el

[PATCH] emacs: convert notmuch-address-harvester to use notmuch-address

2015-01-17 Thread David Bremner
No attempt is made to optimize anything here, just drop in the new command. In particular the use of --output=recipients is known to be slower than --output=senders, but it fit the existing logic better. --- Let us never speak of the parent message again. emacs/notmuch-address.el | 25

Re: DatabaseModifiedErrors causing troubles

2015-01-17 Thread Gaute Hope
Excerpts from David Bremner's message of January 17, 2015 13:29: Gaute Hope e...@gaute.vetsj.com writes: Hi David, Would it be possible with an error code that I could compare against in stead? It would then work a bit like a global instance of the gmime error. It could even be a preparation

Re: [PATCH v3 5/5] Update documentation

2015-01-17 Thread David Bremner
Todd t...@electricoding.com writes: + The new `mimetype:` search prefix allows searching for the + content-type of attachments, which is now indexed by `notmuch + insert`. See the `notmuch-search-terms` manual page for detai it strikes me as odd to single out notmuch-insert here, since

[PATCH v1 0/2] Fixes for issues discovered with -fsanitize=address

2015-01-17 Thread Todd
I built a copy of notmuch with gcc 4.8's new -fsanitize=address feature and ran the test bench. It pointed out these two issues. Todd (2): lib: Fix potential invalid read past an empty string lib: Fix use after free lib/thread.cc | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-)

[PATCH v1 1/2] lib: Fix potential invalid read past an empty string

2015-01-17 Thread Todd
==22884== ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60168291 at pc 0x7ff6295680e5 bp 0x7fff4ab9aa40 sp 0x7fff4ab9aa08 READ of size 1 at 0x60168291 thread T0 #0 0x7ff6295680e4 in __interceptor_strcmp ??:? #1 0x44763b in _thread_add_message

[PATCH v1 2/2] lib: Fix use after free

2015-01-17 Thread Todd
_thread_set_subject_from_message sometimes replaces the subject, making the cur_subject point to free'd memory ==6550== ERROR: AddressSanitizer: heap-use-after-free on address 0x601abec0 at pc 0x4464a4 bp 0x7fffa40be910 sp 0x7fffa40be908 READ of size 1 at 0x601abec0 thread T0 #0

Re: [PATCH v3 3/5] Add indexing for the mimetype term

2015-01-17 Thread Todd
DB == David Bremner da...@tethera.net writes: DB Todd t...@electricoding.com writes: Adds the indexing and removes the broken test flag --- lib/database.cc| 1 + lib/index.cc | 10 ++ test/T190-multipart.sh | 4 3 files changed, 11