[Haskell-cafe] OpenSSL.Digest linking error: EVP_mdc2
Ken Takusagawa
ken.takusagawa.2 at gmail.com
Mon Jul 7 11:26:53 EDT 2008
Thanks. Here's the quick-and-dirty patch I applied to make things work.
--- /tmp/hopenssl-1.0/OpenSSL/Digest.hs 2008-02-20 18:43:43.000000000 -0500
+++ hopenssl-1.0/OpenSSL/Digest.hs 2008-07-07 02:06:55.000000000 -0400
@@ -197,7 +197,7 @@
foreign import ccall unsafe "EVP_sha1" mdSHA1 :: IO MDEngine
foreign import ccall unsafe "EVP_dss" mdDSS :: IO MDEngine
foreign import ccall unsafe "EVP_dss1" mdDSS1 :: IO MDEngine
-foreign import ccall unsafe "EVP_mdc2" mdMDC2 :: IO MDEngine
+--foreign import ccall unsafe "EVP_mdc2" mdMDC2 :: IO MDEngine
foreign import ccall unsafe "EVP_ripemd160" mdRIPEMD160 :: IO MDEngine
-- |Map a 'MessageDigest' type into the the corresponding
@@ -211,7 +211,7 @@
toMDEngine SHA1 = mdSHA1
toMDEngine DSS = mdDSS
toMDEngine DSS1 = mdDSS1
-toMDEngine MDC2 = mdMDC2
+toMDEngine MDC2 = undefined
toMDEngine RIPEMD160 = mdRIPEMD160
-- * Helper Functions
On Mon, Jul 7, 2008 at 1:51 AM, Donn Cave <donn at avvanta.com> wrote:
> Quoth "Ken Takusagawa" <ken.takusagawa.2 at gmail.com>:
>
> | $ ghc --make test-hopenssl.hs -lcrypto
> | [1 of 1] Compiling Main ( test-hopenssl.hs, test-hopenssl.o )
> | Linking test-hopenssl ...
> | /tmp/ken/lib/hopenssl-1.0/ghc-6.8.2/libHShopenssl-1.0.a(Digest.o): In
> | function `s2O8_info':
> | (.text+0xf3a): undefined reference to `EVP_mdc2'
> | /tmp/ken/lib/hopenssl-1.0/ghc-6.8.2/libHShopenssl-1.0.a(Digest.o): In
> | function `s2TQ_info':
> | (.text+0x1435): undefined reference to `EVP_mdc2'
> | collect2: ld returned 1 exit status
>
> I see the following in the Configure file for openssl-0.9.8h:
>
> my $default_depflags = "-DOPENSSL_NO_CAMELLIA -DOPENSSL_NO_CMS -DOPENSSL_NO_GMP -DOPENSSL_NO_MDC2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_SEED -DOPENSSL_NO_TLSEXT ";my $default_depflags = "-DOPENSSL_NO_CAMELLIA -DOPENSSL_NO_CMS -DOPENSSL_NO_GMP
>
> I don't know why this would be, but I infer that the function hopenssl
> was looking for is commonly missing in SSL builds.
>
> Donn Cave, donn at avvanta.com
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
More information about the Haskell-Cafe
mailing list