From: Junio C Hamano <gitster@pobox.com>
To: Eric Sunshine <sunshine@sunshineco.com>
Cc: Jack Nagel <jacknagel@gmail.com>, Git List <git@vger.kernel.org>
Subject: Re: Combining APPLE_COMMON_CRYPTO=1 and NO_OPENSSL=1 produces unexpected result
Date: Sun, 27 Dec 2015 18:29:29 -0800 [thread overview]
Message-ID: <xmqqy4cf9ugm.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <CAPig+cS2+NP=-XEYA6e=doQu=+Qn-Lzut-7OCeYJRFZFchNepg@mail.gmail.com> (Eric Sunshine's message of "Wed, 23 Dec 2015 03:51:56 -0500")
Eric Sunshine <sunshine@sunshineco.com> writes:
> So, it might be easier to think of NO_OPENSSL as really meaning NO_SSL
> (that is, "disable all SSL-related functionality"). Since the only SSL
> implementation Git knows how to use is OpenSSL, perhaps one can
> consider the name NO_OPENSSL a historic anomaly.
That is a good explanation of what is observed. I am not sure if it
is a good justification, though. If you tell somebody who needs to
link an implementation of SHA-1 in that you (1) do not want to use
OpenSSL (or do not want to have SSL at all), and (2) do not mind
using Apple's CommonCrypto, and if you _know_ that CommonCrypto is
a possible source of the SHA-1 implementation, then I would think it
is reasonable to expect that CommonCrypto SHA-1 to be used.
Note. To further explain the situation, the only reason we
added CommonCrypto knob in the build system was to allow
people to use OpenSSL as the SSL implementation. Those who
added the knob weren't making a conscious decision on which
SHA-1 implementation to use in that scenario---they may not
even have been aware of the fact that SHA-1 was offered by
CommonCrypto for that matter.
A few questions we should be asking Apple users are:
- Is there a strong-enough reason why those who do not want to use
SSL should be able to choose the SHA-1 implementation available
from CommonCrypto over block-sha1?
- Is CommonCrypto SHA-1 a better implementation than block-sha1?
Depending on the answers to these questions, we might want to:
- add a knob to allow choosing between two available
implementations (i.e. when NO_APPLE_COMMON_CRYPTO is unset) of
SHA-1, regardless of the setting of NO_OPENSSL.
- decide which one between CommonCrypto and block-sha1 should be
the default.
If we end up deciding that we use block-sha1 as the default, we
should do so even when both NO_OPENSSL and NO_APPLE_COMMON_CRYPTO
are left unset. If we decide that block-sha1 should merely be a
fallback when no other SHA-1 implementation is availble, on the
other hand, we should be using CommonCrypto SHA-1 as long as the
user did not set NO_APPLE_COMMON_CRYPTO explicitly, even when we are
building with NO_OPENSSL.
If people do not care, we can leave things as they are. It would
seem mysterious to use block-sha1 when we are not using CommonCrypto
for SSL (i.e. NO_OPENSSL), and otherwise CommonCrypto SHA-1, and
would invite a puzzlement we saw in this thread, though.
next prev parent reply other threads:[~2015-12-28 2:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-25 15:10 Combining APPLE_COMMON_CRYPTO=1 and NO_OPENSSL=1 produces unexpected result Jack Nagel
2015-12-23 8:51 ` Eric Sunshine
2015-12-28 2:29 ` Junio C Hamano [this message]
2016-01-02 23:49 ` David Aguilar
2016-01-15 18:52 ` Junio C Hamano
2016-01-15 20:28 ` Eric Sunshine
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqy4cf9ugm.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=jacknagel@gmail.com \
--cc=sunshine@sunshineco.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.