From 58207fab22e0584e46c1dcecb73e31b653aae6f0 Mon Sep 17 00:00:00 2001 From: Vlad Glagolev Date: Fri, 16 Apr 2010 19:05:52 +0400 Subject: mailx: fixed compilation with the newest openssl (cherry picked from commit 0b1ffed60c61e0248b57eeda7f8ea386d1cefafe) --- mail/mailx/HISTORY | 4 +++ mail/mailx/PRE_BUILD | 6 ++++ mail/mailx/openssl-1.patch | 69 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 79 insertions(+) create mode 100755 mail/mailx/PRE_BUILD create mode 100644 mail/mailx/openssl-1.patch 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 + * PRE_BUILD: added, to apply the patch + * openssl-1.patch: added, to fix compilation with openssl 1 + 2009-01-15 Vlad Glagolev * 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; -- cgit v1.2.3