From 2962f1e8b54e10198869f73aa359c2a780e5f4cf60fd9275f3d5fe88049a53ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= Date: Sat, 9 Apr 2011 21:34:13 +0000 Subject: [PATCH] Accepting request 66604 from home:elvigia:branches:server:mail OBS-URL: https://build.opensuse.org/request/show/66604 OBS-URL: https://build.opensuse.org/package/show/server:mail/mailx?expand=0&rev=14 --- mailx-fix-openssl.patch | 53 ++++++++++++++++++++++++++++++++--------- mailx.changes | 6 +++++ mailx.spec | 8 +++---- 3 files changed, 52 insertions(+), 15 deletions(-) diff --git a/mailx-fix-openssl.patch b/mailx-fix-openssl.patch index 0c643a6..947082a 100644 --- a/mailx-fix-openssl.patch +++ b/mailx-fix-openssl.patch @@ -1,8 +1,14 @@ -Index: mailx-12.2/openssl.c -=================================================================== ---- mailx-12.2.orig/openssl.c -+++ mailx-12.2/openssl.c -@@ -105,7 +105,7 @@ static SSL_METHOD *ssl_select_method(con +--- openssl.c.orig ++++ openssl.c +@@ -63,6 +63,7 @@ static sigjmp_buf ssljmp; + #include + #include + #include ++#include + + #include "rcv.h" + #include +@@ -105,7 +106,7 @@ static SSL_METHOD *ssl_select_method(con static void ssl_load_verifications(struct sock *sp); static void ssl_certificate(struct sock *sp, const char *uhp); static enum okay ssl_check_host(const char *server, struct sock *sp); @@ -11,7 +17,32 @@ Index: mailx-12.2/openssl.c X509_STORE *store); static EVP_CIPHER *smime_cipher(const char *name); static int ssl_password_cb(char *buf, int size, int rwflag, void *userdata); -@@ -308,7 +308,7 @@ ssl_check_host(const char *server, struc +@@ -166,6 +167,10 @@ ssl_init(void) + verbose = value("verbose") != NULL; + if (initialized == 0) { + SSL_library_init(); ++/* Load all bundled ENGINEs into memory and make them visible */ ++ ENGINE_load_builtin_engines(); ++ /* Register all of them for every algorithm they collectively implement */ ++ ENGINE_register_all_complete(); + initialized = 1; + } + if (rand_init == 0) +@@ -211,9 +216,12 @@ ssl_select_method(const char *uhp) + + cp = ssl_method_string(uhp); + if (cp != NULL) { ++#ifndef OPENSSL_NO_SSL2 + if (equal(cp, "ssl2")) + method = SSLv2_client_method(); +- else if (equal(cp, "ssl3")) ++ else ++#endif ++ if (equal(cp, "ssl3")) + method = SSLv3_client_method(); + else if (equal(cp, "tls1")) + method = TLSv1_client_method(); +@@ -308,7 +316,7 @@ ssl_check_host(const char *server, struc X509 *cert; X509_NAME *subj; char data[256]; @@ -20,7 +51,7 @@ Index: mailx-12.2/openssl.c GENERAL_NAME *gen; int i; -@@ -494,7 +494,7 @@ smime_sign(FILE *ip, struct header *head +@@ -494,7 +502,7 @@ smime_sign(FILE *ip, struct header *head } static int @@ -29,7 +60,7 @@ Index: mailx-12.2/openssl.c { struct message *x; char *cp, *sender, *to, *cc, *cnttype; -@@ -503,7 +503,8 @@ smime_verify(struct message *m, int n, S +@@ -503,7 +511,8 @@ smime_verify(struct message *m, int n, S off_t size; BIO *fb, *pb; PKCS7 *pkcs7; @@ -39,7 +70,7 @@ Index: mailx-12.2/openssl.c X509 *cert; X509_NAME *subj; char data[LINESIZE]; -@@ -612,7 +613,7 @@ cverify(void *vp) +@@ -612,7 +621,7 @@ cverify(void *vp) { int *msgvec = vp, *ip; int ec = 0; @@ -48,7 +79,7 @@ Index: mailx-12.2/openssl.c X509_STORE *store; char *ca_dir, *ca_file; -@@ -685,7 +686,7 @@ smime_encrypt(FILE *ip, const char *cert +@@ -685,7 +694,7 @@ smime_encrypt(FILE *ip, const char *cert X509 *cert; PKCS7 *pkcs7; BIO *bb, *yb; @@ -57,7 +88,7 @@ Index: mailx-12.2/openssl.c EVP_CIPHER *cipher; certfile = expand((char *)certfile); -@@ -948,9 +949,9 @@ smime_certsave(struct message *m, int n, +@@ -948,9 +957,9 @@ smime_certsave(struct message *m, int n, off_t size; BIO *fb, *pb; PKCS7 *pkcs7; diff --git a/mailx.changes b/mailx.changes index 44661c5..3985bb4 100644 --- a/mailx.changes +++ b/mailx.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sat Apr 9 21:30:46 UTC 2011 - crrodriguez@opensuse.org + +- Allow mailx to compile properly when openSSL is built without + SSLv2 support. + ------------------------------------------------------------------- Tue Feb 1 10:39:15 UTC 2011 - gber@opensuse.org diff --git a/mailx.spec b/mailx.spec index 351ca11..bd7e2d0 100644 --- a/mailx.spec +++ b/mailx.spec @@ -1,7 +1,7 @@ # -# spec file for package mailx (Version 12.2) +# spec file for package mailx # -# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -27,7 +27,7 @@ Provides: mail Recommends: smtp_daemon AutoReqProv: on Version: 12.2 -Release: 145 +Release: 153 Summary: A MIME-Capable Implementation of the mailx Command Source: mailx-%{version}.tar.bz2 Patch: mailx-%{version}.dif @@ -54,7 +54,7 @@ minor enhancements like the ability to set a "From:" address. %patch4 -p0 -b .toaddr %patch5 -p0 -b .mime %patch -p0 -%patch6 -p1 +%patch6 %build CC=gcc