pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/45785: msmtp AUTH CRAM-MD5 broken if OpenSSL is used



>Number:         45785
>Category:       pkg
>Synopsis:       msmtp AUTH CRAM-MD5 broken if OpenSSL is used
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jan 05 14:15:01 +0000 2012
>Originator:     Moritz Wilhelmy
>Release:        NetBSD 5.99.59
>Organization:
>Environment:
System: NetBSD fenrir 5.99.59 NetBSD 5.99.59 (GENERIC) #6: Mon Jan 2 18:39:15 
CET 2012 root@fenrir:/usr/obj/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386
>Description:
        According to a private mail from Martin Lambers, the msmtp developer in
        response to my original bug-report, if msmtp is linked against OpenSSL 
but not
        GNU SASL, the OpenSSL library is not initialised which apparently 
causes the
        md5-functions to return garbage.
>How-To-Repeat:
        Build msmtp with only the ssl option (which is the default on pkgsrc)
>Fix:
        Martin sent me the following patch, which fixes the bug for me:

Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/mail/msmtp/distinfo,v
retrieving revision 1.22
diff -u -p -r1.22 distinfo
--- distinfo    2 Dec 2011 12:33:53 -0000       1.22
+++ distinfo    5 Jan 2012 13:07:29 -0000
@@ -3,4 +3,6 @@ $NetBSD: distinfo,v 1.22 2011/12/02 12:3
 SHA1 (msmtp-1.4.26.tar.bz2) = 0ce5352447b01dc21970b7a00cf13b8a3e7172c9
 RMD160 (msmtp-1.4.26.tar.bz2) = 9e552483193129589510f589f3d11ed4ed0c0abb
 Size (msmtp-1.4.26.tar.bz2) = 301686 bytes
 SHA1 (patch-src_Makefile.in) = 0af62b9cee833f3b23e2d504462a380bb97953cc
+SHA1 (patch-src_md5.c) = 179bd57b1fcfc38aa9af334fdfd8d33636daafca
+SHA1 (patch-src_md5.h) = fbf1c55d51dd9c98493cc851c689900b94fa135c
Index: patches/patch-src_md5.c
===================================================================
RCS file: patches/patch-src_md5.c
diff -N patches/patch-src_md5.c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_md5.c     5 Jan 2012 13:07:29 -0000
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- src/md5.c.orig     2011-04-26 21:37:43.000000000 +0000
++++ src/md5.c
+@@ -35,7 +35,7 @@
+  * compile-time configuration.
+  */
+ 
+-#ifndef HAVE_LIBSSL
++#ifndef HAVE_OPENSSL
+ 
+ #include <string.h>
+ 
Index: patches/patch-src_md5.h
===================================================================
RCS file: patches/patch-src_md5.h
diff -N patches/patch-src_md5.h
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_md5.h     5 Jan 2012 13:07:29 -0000
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- src/md5.h.orig     2011-04-26 21:37:43.000000000 +0000
++++ src/md5.h
+@@ -23,7 +23,16 @@
+  * See md5.c for more information.
+  */
+ 
+-#ifdef HAVE_LIBSSL
++/* Local change for msmtp: always use these functions regardless of 
HAVE_OPENSSL,
++ * and use the prefix 'msmtp_' for all symbols to avoid clashes. */
++#undef HAVE_OPENSSL
++#define MD5_u32plus msmtp_MD5_u32plus
++#define MD5_CTX msmtp_MD5_CTX
++#define MD5_Init msmtp_MD5_Init
++#define MD5_Update msmtp_MD5_Update
++#define MD5_Final msmtp_MD5_Final
++
++#ifdef HAVE_OPENSSL
+ #include <openssl/md5.h>
+ #elif !defined(_MD5_H)
+ #define _MD5_H



Home | Main Index | Thread Index | Old Index