freebsd-ports/devel/tcl-trf/files/patch-crypt
Mikhail Teterin d0b2e40d6b Retreat to using OpenSSL's message digest routines instead of -lmd. They
are sometimes faster and never slower. Using -lmd is still possible by
building with ``TRF_USE_MD=yes''. Bump PORTREVISION.

Use the RIPEMD160* routines from -lcrypto (or -lmd) instead of our own
-- just like for md[25] and sha*. Neither -lcrypto nor -lmd provide
RIPEMD128 (not strong enough?), so stay with our own implementation.

sparc64/amd64 are not expected to work yet...
2004-07-11 08:38:31 +00:00

32 lines
705 B
Text

--- generic/crypt.c Sat Nov 18 17:42:31 2000
+++ generic/crypt.c Fri Feb 8 11:59:47 2002
@@ -29,4 +29,6 @@
+#include <sys/types.h>
+#include <unistd.h>
#include "loadman.h"
static int
@@ -112,4 +112,6 @@
*/
+char *crypt_md5(const char *pw, const char *salt); /* Lives in -lcrypt */
+
static int
TrfMd5CryptObjCmd (notUsed, interp, objc, objv)
@@ -128,8 +130,4 @@
Tcl_Obj* res;
- if (TrfLoadMD5 (interp) != TCL_OK) {
- return TCL_ERROR;
- }
-
if (objc != 3) {
Tcl_AppendResult (interp,
@@ -159,5 +157,5 @@
TrfLock;
- res = Tcl_NewStringObj ((char*) md5f.crypt (passwd, salt_b) + 3, -1);
+ res = Tcl_NewStringObj (crypt_md5(passwd, salt_b) + 3, -1);
TrfUnlock;