{"thread":{"id":"33460","subject":"[PATCH] git-imap-send.txt: remove the use of sslverify=false in GMail example","startedAt":"2013-04-10T14:59:37Z","lastAt":"2013-04-24T17:18:05Z","messageCount":8,"participants":["Barbu Paul - Gheorghe","Junio C Hamano","Simon Ruderich"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"213778","messageId":"51657E59.7030001@gmail.com","threadId":"33460","inReplyTo":null,"subject":"[PATCH] git-imap-send.txt: remove the use of sslverify=false in GMail example","fromName":"Barbu Paul - Gheorghe","fromEmail":"barbu.paul.gheorghe@gmail.com","sentAt":"2013-04-10T14:59:37Z","receivedAt":"2013-04-10T14:59:37Z","isPatch":true,"sender":{"key":"barbu.paul.gheorghe@gmail.com","avatar":"https://gravatar.com/avatar/69538f184f400151624120f3a6e3ee2b1184fb11b92336b0c018381a2d4e0870?d=mp&s=160"},"body":"Since GMail is SSL capable there is no need to set sslverify to false, the\nexample using it may confuse readers that it's needed since it's also used in\nthe previous example configurations, too\n\nSigned-off-by: Barbu Paul - Gheorghe <barbu.paul.gheorghe@gmail.com>\n---\n Documentation/git-imap-send.txt | 1 -\n 1 file changed, 1 deletion(-)\n\ndiff --git a/Documentation/git-imap-send.txt b/Documentation/git-imap-send.txt\nindex 875d283..b15dffe 100644\n--- a/Documentation/git-imap-send.txt\n+++ b/Documentation/git-imap-send.txt\n@@ -123,7 +123,6 @@ to specify your account settings:\n \thost = imaps://imap.gmail.com\n \tuser = user@gmail.com\n \tport = 993\n-\tsslverify = false\n ---------\n  You might need to instead use: folder = \"[Google Mail]/Drafts\" if you get an error\n-- \nBarbu Paul - Gheorghe\nCommon sense is not so common - Voltaire\nVisit My GitHub profile to see my open-source projects - https://github.com/paullik\n"},{"id":"213800","messageId":"7vmwt6mdjg.fsf@alter.siamese.dyndns.org","threadId":"33460","inReplyTo":"51657E59.7030001@gmail.com","subject":"Re: [PATCH] git-imap-send.txt: remove the use of sslverify=false in GMail example","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-04-10T18:44:03Z","receivedAt":"2013-04-10T18:44:03Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Barbu Paul - Gheorghe <barbu.paul.gheorghe@gmail.com> writes:\n\n> Since GMail is SSL capable there is no need to set sslverify to false, the\n> example using it may confuse readers that it's needed since it's also used in\n> the previous example configurations, too\n>\n> Signed-off-by: Barbu Paul - Gheorghe <barbu.paul.gheorghe@gmail.com>\n> ---\n\nThanks.\n\nWhile removing that item from the configuration is a good thing to\ndo in the post 1.8.2.1 era, the reason why it is does not have much\nto do with \"GMail is SSL capable\".\n\nThe configuration item is not about \"Do we connect over SSL when\ntalking to this host?\", but is about \"When we use SSL with this\nhost, do we verify the certificate it gave us?\".\n\nThe reason why we can run with sslverify=true against gmail is\nbecause we know imap.gmail.com gives a validly signed certificate\nthat leads all the way to a root CA the user's OpenSSL installation\nis likely to trust (if your hand-rolled imap-over-ssl server uses a\nsnakeoil certificate, even though the server may be \"SSL capable\",\nyou may not be able to successfully connect to it without sslverify\nturned off).\n\nSide note.  Before 1.8.2 and/or 1.8.1.4, git-imap-send did not\nimplement sslverify correctly; CVS-2013-0308 was inherited from its\norigin \"isync\", where it _did_ verify the certificate is valid, but\ndid not make sure the certificate was for the host it thought it was\ntalking with.\n\nAlso note that 1.8.2.1 and/or 1.8.1.6 were the first versions that\nsupport Server Name Identification (RFC4366). Connection with older\nversions of git-imap-send over SSL to hosts like googlemail.com that\nmulti-home different SSL hosts can receive a valid certificate for\nanother host that sits at the same IP address, which will lead to\nthe sslverify check to fail.\n\n>  Documentation/git-imap-send.txt | 1 -\n>  1 file changed, 1 deletion(-)\n>\n> diff --git a/Documentation/git-imap-send.txt b/Documentation/git-imap-send.txt\n> index 875d283..b15dffe 100644\n> --- a/Documentation/git-imap-send.txt\n> +++ b/Documentation/git-imap-send.txt\n> @@ -123,7 +123,6 @@ to specify your account settings:\n>  \thost = imaps://imap.gmail.com\n>  \tuser = user@gmail.com\n>  \tport = 993\n> -\tsslverify = false\n>  ---------\n>   You might need to instead use: folder = \"[Google Mail]/Drafts\" if you get an error\n"},{"id":"213959","messageId":"5166BC41.5020202@gmail.com","threadId":"33460","inReplyTo":"7vmwt6mdjg.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] git-imap-send.txt: remove the use of sslverify=false in GMail example","fromName":"Barbu Paul - Gheorghe","fromEmail":"barbu.paul.gheorghe@gmail.com","sentAt":"2013-04-11T13:36:01Z","receivedAt":"2013-04-11T13:36:01Z","isPatch":true,"sender":{"key":"barbu.paul.gheorghe@gmail.com","avatar":"https://gravatar.com/avatar/69538f184f400151624120f3a6e3ee2b1184fb11b92336b0c018381a2d4e0870?d=mp&s=160"},"body":"On 04/10/2013 09:44 PM, Junio C Hamano wrote:\n> Thanks.\n\nMy pleasure.\n\n> While removing that item from the configuration is a good thing to\n> do in the post 1.8.2.1 era, the reason why it is does not have much\n> to do with \"GMail is SSL capable\".\n\nShould I change the commit message in order to avoid confusion among devs that\nread it?\n\n> The configuration item is not about \"Do we connect over SSL when\n> talking to this host?\", but is about \"When we use SSL with this\n> host, do we verify the certificate it gave us?\".\n\nIf I change it, how should it sound?\nIt could be:\n\nSince GMail's certificates can be sslverify-ed there is no need to set sslverify\nto false, the example using it may confuse readers that it's needed since it's\nalso used in the previous example configurations, too.\n\nHave a nice day!\n\n-- \nBarbu Paul - Gheorghe\nCommon sense is not so common - Voltaire\nVisit My GitHub profile to see my open-source projects - https://github.com/paullik\n"},{"id":"213961","messageId":"20130411152617.GA14264@ruderich.org","threadId":"33460","inReplyTo":"7vmwt6mdjg.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] git-imap-send.txt: remove the use of sslverify=false in GMail example","fromName":"Simon Ruderich","fromEmail":"simon@ruderich.org","sentAt":"2013-04-11T15:26:17Z","receivedAt":"2013-04-11T15:26:17Z","isPatch":true,"sender":{"key":"simon@ruderich.org","avatar":"https://avatars.githubusercontent.com/u/390994?v=4"},"body":"On Wed, Apr 10, 2013 at 11:44:03AM -0700, Junio C Hamano wrote:\n> The reason why we can run with sslverify=true against gmail is\n> because we know imap.gmail.com gives a validly signed certificate\n> that leads all the way to a root CA the user's OpenSSL installation\n> is likely to trust (if your hand-rolled imap-over-ssl server uses a\n> snakeoil certificate, even though the server may be \"SSL capable\",\n> you may not be able to successfully connect to it without sslverify\n> turned off).\n\nMaybe imap-send should learn imap.sslCAInfo and imap.sslCAPath\nlike http.* to handle custom certificates.\n\n>> diff --git a/Documentation/git-imap-send.txt b/Documentation/git-imap-send.txt\n>> index 875d283..b15dffe 100644\n>> --- a/Documentation/git-imap-send.txt\n>> +++ b/Documentation/git-imap-send.txt\n>> @@ -123,7 +123,6 @@ to specify your account settings:\n>>  \thost = imaps://imap.gmail.com\n>>  \tuser = user@gmail.com\n>>  \tport = 993\n>> -\tsslverify = false\n>>  ---------\n>>   You might need to instead use: folder = \"[Google Mail]/Drafts\" if you get an error\n\nI think we should remove sslverify = false from the other example\nas well. \"Recommending\" sslverify = false is IMHO a bad idea as\nSSL provides no protection without verification.\n\nRegards\nSimon\n-- \n+ privacy is necessary\n+ using gnupg http://gnupg.org\n+ public key id: 0x92FEFDB7E44C32F9\n"},{"id":"213963","messageId":"5166DCD7.2030105@gmail.com","threadId":"33460","inReplyTo":"20130411152617.GA14264@ruderich.org","subject":"Re: [PATCH] git-imap-send.txt: remove the use of sslverify=false in GMail example","fromName":"Barbu Paul - Gheorghe","fromEmail":"barbu.paul.gheorghe@gmail.com","sentAt":"2013-04-11T15:55:03Z","receivedAt":"2013-04-11T15:55:03Z","isPatch":true,"sender":{"key":"barbu.paul.gheorghe@gmail.com","avatar":"https://gravatar.com/avatar/69538f184f400151624120f3a6e3ee2b1184fb11b92336b0c018381a2d4e0870?d=mp&s=160"},"body":"On 04/11/2013 06:26 PM, Simon Ruderich wrote:\n\n> I think we should remove sslverify = false from the other example\n> as well. \"Recommending\" sslverify = false is IMHO a bad idea as\n> SSL provides no protection without verification.\n\nYep, that was why I thought there should be at least an example without it.\n\nShould I create a new patch removing them all?\n\n-- \nBarbu Paul - Gheorghe\nCommon sense is not so common - Voltaire\nVisit My GitHub profile to see my open-source projects - https://github.com/paullik\n"},{"id":"214921","messageId":"20130420140802.GC29454@ruderich.org","threadId":"33460","inReplyTo":"5166DCD7.2030105@gmail.com","subject":"Re: [PATCH] git-imap-send.txt: remove the use of sslverify=false in GMail example","fromName":"Simon Ruderich","fromEmail":"simon@ruderich.org","sentAt":"2013-04-20T14:08:02Z","receivedAt":"2013-04-20T14:08:02Z","isPatch":true,"sender":{"key":"simon@ruderich.org","avatar":"https://avatars.githubusercontent.com/u/390994?v=4"},"body":"On Thu, Apr 11, 2013 at 06:55:03PM +0300, Barbu Paul - Gheorghe wrote:\n> Should I create a new patch removing them all?\n\nSounds like a good idea to me. And update the commit message with\nJunio's suggestions.\n\nRegards\nSimon\n-- \n+ privacy is necessary\n+ using gnupg http://gnupg.org\n+ public key id: 0x92FEFDB7E44C32F9\n"},{"id":"215110","messageId":"51758EE8.7030800@gmail.com","threadId":"33460","inReplyTo":"20130420140802.GC29454@ruderich.org","subject":"[PATCH] git-imap-send.txt: remove the use of sslverify=false","fromName":"Barbu Paul - Gheorghe","fromEmail":"barbu.paul.gheorghe@gmail.com","sentAt":"2013-04-22T19:26:32Z","receivedAt":"2013-04-22T19:26:32Z","isPatch":true,"sender":{"key":"barbu.paul.gheorghe@gmail.com","avatar":"https://gravatar.com/avatar/69538f184f400151624120f3a6e3ee2b1184fb11b92336b0c018381a2d4e0870?d=mp&s=160"},"body":"Since SSL provides no protection if the certificates aren't verified it's\nbetter not to include sslverify=false in the examples.\nAlso in the post 1.8.2.1 era git is able to properly verify the validity of a\ncertificate as well it's origin.\n\nSigned-off-by: Barbu Paul - Gheorghe <barbu.paul.gheorghe@gmail.com>\n---\n Documentation/git-imap-send.txt | 2 --\n 1 file changed, 2 deletions(-)\n\ndiff --git a/Documentation/git-imap-send.txt b/Documentation/git-imap-send.txt\nindex 875d283..0d72977 100644\n--- a/Documentation/git-imap-send.txt\n+++ b/Documentation/git-imap-send.txt\n@@ -108,7 +108,6 @@ Using direct mode with SSL:\n     user = bob\n     pass = p4ssw0rd\n     port = 123\n-    sslverify = false\n ..........................\n  @@ -123,7 +122,6 @@ to specify your account settings:\n \thost = imaps://imap.gmail.com\n \tuser = user@gmail.com\n \tport = 993\n-\tsslverify = false\n ---------\n  You might need to instead use: folder = \"[Google Mail]/Drafts\" if you get an error\n-- \nBarbu Paul - Gheorghe\nCommon sense is not so common - Voltaire\nVisit My GitHub profile to see my open-source projects - https://github.com/paullik\n"},{"id":"215334","messageId":"7vr4hzetki.fsf@alter.siamese.dyndns.org","threadId":"33460","inReplyTo":"51758EE8.7030800@gmail.com","subject":"Re: [PATCH] git-imap-send.txt: remove the use of sslverify=false","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-04-24T17:18:05Z","receivedAt":"2013-04-24T17:18:05Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Barbu Paul - Gheorghe <barbu.paul.gheorghe@gmail.com> writes:\n\n> Since SSL provides no protection if the certificates aren't verified it's\n> better not to include sslverify=false in the examples.\n> Also in the post 1.8.2.1 era git is able to properly verify the validity of a\n> certificate as well it's origin.\n>\n> Signed-off-by: Barbu Paul - Gheorghe <barbu.paul.gheorghe@gmail.com>\n> ---\n>  Documentation/git-imap-send.txt | 2 --\n>  1 file changed, 2 deletions(-)\n>\n> diff --git a/Documentation/git-imap-send.txt b/Documentation/git-imap-send.txt\n> index 875d283..0d72977 100644\n> --- a/Documentation/git-imap-send.txt\n> +++ b/Documentation/git-imap-send.txt\n> @@ -108,7 +108,6 @@ Using direct mode with SSL:\n>      user = bob\n>      pass = p4ssw0rd\n>      port = 123\n> -    sslverify = false\n>  ..........................\n>   @@ -123,7 +122,6 @@ to specify your account settings:\n>  \thost = imaps://imap.gmail.com\n>  \tuser = user@gmail.com\n>  \tport = 993\n> -\tsslverify = false\n>  ---------\n>   You might need to instead use: folder = \"[Google Mail]/Drafts\" if you get an error\n\nIt is amusing that an MTA can mangle such a short patch this badly.\n\nCount the number of preimage lines in the first hunk and you see\nonly 5 lines but you claim it has 7.  Where did the other two go?\nThe second hunk has the same problem.  \"@@\" that introduces the\nsecond hunk is not at the leftmost column.  Where did the leading SP\ncome from?\n\nThe examples in the documentation are primarily to demonstrate how\nthe supported configurations and options can be used and for what\npurpose. its secondary purpose is to nudge the readers into the best\npractice.\n\nSo I'd suggest a patch that does these things instead of just\nremoving these two:\n\n (0) Remove the duplication between the Examples header with ~~~~~~\n     underline and the EXAMPLE header with ------ underline.\n\n (1) Use the second hunk of your patch to remove sslverify=false\n     from that imap.gmail.com example.  As a public service, it is\n     unlikely that the server side is configured to throw a\n     certificate that does not verify at you.\n\n (2) Instead of removing sslverify=false in the imap.example.com\n     example, comment it out like this:\n\n     -\tsslverify = false\n     +\t; sslverify = false\n\n     Then mention that the user may want to use sslverify=false\n     while troubleshooting, if he suspects that the reason he is\n     having trouble connecting is because the certificate he uses at\n     the private server at example.com he is trying to set up (or\n     has set up) may not be verified correctly.\n"}]}