LIBS=../../libcrypto
-SOURCE[../../libcrypto]=\
- mdc2dgst.c mdc2_one.c
+
+SOURCE[../../libcrypto]=mdc2dgst.c mdc2_one.c
+
+# When all deprecated symbols are removed, libcrypto doesn't export the
+# MDC2 functions, so we must include them directly in liblegacy.a
+IF[{- $disabled{'deprecated-3.0'} -}]
+ SOURCE[../../providers/liblegacy.a]=mdc2dgst.c mdc2_one.c
+ENDIF