summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVlad Glagolev2010-04-16 19:05:52 +0400
committerArwed von Merkatz2010-04-16 19:57:21 +0200
commit58207fab22e0584e46c1dcecb73e31b653aae6f0 (patch)
tree8a98e4cdca17db3d7a3c4fa6457ce075ea083410
parent6119d995f5d1e36faf31d9c69ba972a9635cf9cb (diff)
mailx: fixed compilation with the newest opensslstable-rc-0.43
(cherry picked from commit 0b1ffed60c61e0248b57eeda7f8ea386d1cefafe)
-rw-r--r--mail/mailx/HISTORY4
-rwxr-xr-xmail/mailx/PRE_BUILD6
-rw-r--r--mail/mailx/openssl-1.patch69
3 files changed, 79 insertions, 0 deletions
diff --git a/mail/mailx/HISTORY b/mail/mailx/HISTORY
index 4ecb6c275b..dbe5962ccf 100644
--- a/mail/mailx/HISTORY
+++ b/mail/mailx/HISTORY
@@ -1,3 +1,7 @@
+2010-04-16 Vlad Glagolev <stealth@sourcemage.org>
+ * PRE_BUILD: added, to apply the patch
+ * openssl-1.patch: added, to fix compilation with openssl 1
+
2009-01-15 Vlad Glagolev <stealth@sourcemage.org>
* DETAILS: updated spell to 12.4; quoting paths; fixed short desc
* INSTALL: quoting paths
diff --git a/mail/mailx/PRE_BUILD b/mail/mailx/PRE_BUILD
new file mode 100755
index 0000000000..bd753afa52
--- /dev/null
+++ b/mail/mailx/PRE_BUILD
@@ -0,0 +1,6 @@
+default_pre_build &&
+cd "$SOURCE_DIRECTORY" &&
+
+if spell_ok openssl && [[ $(installed_version openssl) > 1.0 ]]; then
+ patch -p0 < "$SPELL_DIRECTORY/openssl-1.patch"
+fi
diff --git a/mail/mailx/openssl-1.patch b/mail/mailx/openssl-1.patch
new file mode 100644
index 0000000000..5820dee5b6
--- /dev/null
+++ b/mail/mailx/openssl-1.patch
@@ -0,0 +1,69 @@
+--- openssl.c.orig 2007-08-04 11:38:03.000000000 +0000
++++ openssl.c 2010-04-04 20:37:40.000000000 +0000
+@@ -105,7 +105,7 @@
+ 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);
+-static int smime_verify(struct message *m, int n, STACK *chain,
++static int smime_verify(struct message *m, int n, STACK_OF(X509) *chain,
+ 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 @@
+ X509 *cert;
+ X509_NAME *subj;
+ char data[256];
+- /*GENERAL_NAMES*/STACK *gens;
++ /*GENERAL_NAMES*/STACK_OF(GENERAL_NAMES) *gens;
+ GENERAL_NAME *gen;
+ int i;
+
+@@ -496,7 +496,7 @@
+ }
+
+ static int
+-smime_verify(struct message *m, int n, STACK *chain, X509_STORE *store)
++smime_verify(struct message *m, int n, STACK_OF(X509) *chain, X509_STORE *store)
+ {
+ struct message *x;
+ char *cp, *sender, *to, *cc, *cnttype;
+@@ -505,7 +505,8 @@
+ off_t size;
+ BIO *fb, *pb;
+ PKCS7 *pkcs7;
+- STACK *certs, *gens;
++ STACK_OF(X509) *certs;
++ STACK_OF(GENERAL_NAMES) *gens;
+ X509 *cert;
+ X509_NAME *subj;
+ char data[LINESIZE];
+@@ -614,7 +615,7 @@
+ {
+ int *msgvec = vp, *ip;
+ int ec = 0;
+- STACK *chain = NULL;
++ STACK_OF(X509) *chain = NULL;
+ X509_STORE *store;
+ char *ca_dir, *ca_file;
+
+@@ -687,7 +688,7 @@
+ X509 *cert;
+ PKCS7 *pkcs7;
+ BIO *bb, *yb;
+- STACK *certs;
++ STACK_OF(X509) *certs;
+ EVP_CIPHER *cipher;
+
+ certfile = expand((char *)certfile);
+@@ -950,9 +951,9 @@
+ off_t size;
+ BIO *fb, *pb;
+ PKCS7 *pkcs7;
+- STACK *certs;
++ STACK_OF(X509) *certs;
+ X509 *cert;
+- STACK *chain = NULL;
++ STACK_OF(X509) *chain = NULL;
+ enum okay ok = OKAY;
+
+ message_number = n;