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

Re: [PATCH] Makefile: Add NEEDS_CRYPTO_WITH_SSL

From
Brian Gernhardt <brian@gernhardtsoftware.com>
Date
Sep 9, 2009, 00:40 UTC
Message-ID
<2DD80FE2-385E-4488-811F-A80450AACA23@gernhardtsoftware.com>
In-Reply-To
<7vhbvdyysq.fsf@alter.siamese.dyndns.org>
On Sep 8, 2009, at 4:19 PM, Junio C Hamano wrote:
Show 13 quoted lines
> 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?

It just occurred to me that I have a Debian machine to test this on. I generally don't use my web server for testing, but testing a compile should be safe enough.

Sure enough, it compiles without this patch. It may be a difference between the linkers. It appears that ERR_error_string() is in libcrypto for both OS X and Debian and that libssl.{so,dylib} both have load commands for libcrypto.{so,dylib}, but OS X ld is pickier than Debian ld. Odd.

I don't see a scenario where only -lcrypto would be used for imap- send, actually. That would imply that we're using OpenSSL's SHA-1 algorithm but not using it for IMAPS access. SSL_WITH_CRYPTO is about needing -lssl when using -lcrypto for SHA-1 while CRYPTO_WITH_SSL is about needing -lcrypto when using -lssl for SSL.

The only simplification I can think of is to make NEEDS_CRYPTO_WITH_SSL and NEEDS_SSL_WITH_CRYPTO be the same, so that it will include both any time it includes either one. NEEDS_SSL_WITH_CRYPTO is set for UnixWare, SCO_SV, and OS X. I only have the latter to test with so I don't know if the symmetry is true for the other two.

~~ Brian
Previous: Junio C Hamano
Message 3 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.