git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Makefile: Add NEEDS_CRYPTO_WITH_SSL

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 8, 2009, 20:19 UTC
Message-ID
<7vhbvdyysq.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1252418078-68650-1-git-send-email-brian@gernhardtsoftware.com>
Brian Gernhardt <brian@gernhardtsoftware.com> writes:
> The Makefile comment for NEEDS_SSL_WITH_CRYPTO says to define it "if
> you need -lcrypto with -lssl (Darwin)."  However, what it actually
> does is add -lssl when you use -lcrypto and not the other way around.
Correct.  That is worth fixing.
> However, libcrypto contains a majority of the ERR_* functions from
> OpenSSL (at least on OS X) so we need it both ways.

I see. We need to be able to see ERR_err_string(), whose caller happens to be only imap-send.c for now, and that function is in -lcrypto together with other ERR_* functions.

Show 8 quoted lines
>  Compilation using BLK_SHA1 on OS X 10.5 and 10.6 (at least) is still
>  broken without this patch.
>
>  Alex Riesen <raa.lkml@gmail.com> pointed out that just adding LIB_4_CRYPTO
>  to git-imap-send is simpler, but judging from the fact that nobody else
>  has complained about this issue, I'm guessing that the need for -lcrypto
>  when using -lssl is not widespread.  (Or BLK_SHA1 isn't getting used much
>  or those who do don't compile git-imap-send with SSL.)

BLK_SHA1 is fairly new on 'master', so lack of breakage report is expected.

The patch makes sense to me, but as the result, depending on platforms and configuration, we would use three variations when linking imap-send with no NO_OPENSSL defined:

 * Both -lcrypto -lssl
 * Only -lssl
 * Only -lcrypto
I wonder if we can simplify this in some way (not a 1.6.5 topic).

I am suspecting that the reason we do not say "always both" is because depending on the vintage of OpenSSL one or the other is missing?

Previous: Brian GernhardtNext: Brian Gernhardt
Message 2 of 3 in “Makefile: Add NEEDS_CRYPTO_WITH_SSL”
  1. Makefile: Add NEEDS_CRYPTO_WITH_SSLBrian Gernhardt, Sep 8, 2009
  2. Junio C HamanoSep 8, 2009
  3. Brian GernhardtSep 9, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.