Unbreak with gnutls>=3.
This commit is contained in:
parent
c9aa643043
commit
17d1fc2ae3
@ -1,8 +1,8 @@
|
||||
# $OpenBSD: Makefile,v 1.23 2011/04/15 16:10:37 ajacoutot Exp $
|
||||
# $OpenBSD: Makefile,v 1.24 2012/07/09 09:34:26 ajacoutot Exp $
|
||||
|
||||
COMMENT= multiple mailbox checker dockapp
|
||||
DISTNAME= wmbiff-0.4.27
|
||||
REVISION = 2
|
||||
REVISION = 3
|
||||
CATEGORIES= mail x11 x11/windowmaker
|
||||
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=wmbiff/}
|
||||
|
||||
@ -14,7 +14,7 @@ PERMIT_PACKAGE_FTP= Yes
|
||||
PERMIT_DISTFILES_CDROM= Yes
|
||||
PERMIT_DISTFILES_FTP= Yes
|
||||
|
||||
WANTLIB += X11 Xext Xpm c gcrypt gpg-error z
|
||||
WANTLIB += X11 Xext Xpm c gcrypt gnutls gpg-error pthread z
|
||||
|
||||
MODULES= devel/gettext
|
||||
|
||||
|
31
mail/wmbiff/patches/patch-wmbiff_gnutls-common_c
Normal file
31
mail/wmbiff/patches/patch-wmbiff_gnutls-common_c
Normal file
@ -0,0 +1,31 @@
|
||||
$OpenBSD: patch-wmbiff_gnutls-common_c,v 1.3 2012/07/09 09:34:26 ajacoutot Exp $
|
||||
--- wmbiff/gnutls-common.c.orig Mon Jul 9 11:11:19 2012
|
||||
+++ wmbiff/gnutls-common.c Mon Jul 9 11:30:10 2012
|
||||
@@ -4,7 +4,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <gnutls/gnutls.h>
|
||||
-#include <gnutls/extra.h>
|
||||
#include <gnutls/x509.h>
|
||||
#include <gnutls/openpgp.h>
|
||||
#include <time.h>
|
||||
@@ -335,8 +334,8 @@ void print_openpgp_info(gnutls_session session, const
|
||||
void print_cert_vrfy(gnutls_session session)
|
||||
{
|
||||
|
||||
- int status;
|
||||
- status = gnutls_certificate_verify_peers(session);
|
||||
+ int status, verify_ret;
|
||||
+ verify_ret = gnutls_certificate_verify_peers2(session, &status);
|
||||
printf("\n");
|
||||
|
||||
if (status == GNUTLS_E_NO_CERTIFICATE_FOUND) {
|
||||
@@ -637,8 +636,6 @@ void parse_comp(char **comp, int ncomp, int *comp_prio
|
||||
comp_priority[j++] = GNUTLS_COMP_NULL;
|
||||
if (strncasecmp(comp[i], "ZLI", 3) == 0)
|
||||
comp_priority[j++] = GNUTLS_COMP_ZLIB;
|
||||
- if (strncasecmp(comp[i], "LZO", 3) == 0)
|
||||
- comp_priority[j++] = GNUTLS_COMP_LZO;
|
||||
}
|
||||
comp_priority[j] = 0;
|
||||
}
|
51
mail/wmbiff/patches/patch-wmbiff_tlsComm_c
Normal file
51
mail/wmbiff/patches/patch-wmbiff_tlsComm_c
Normal file
@ -0,0 +1,51 @@
|
||||
$OpenBSD: patch-wmbiff_tlsComm_c,v 1.3 2012/07/09 09:34:26 ajacoutot Exp $
|
||||
--- wmbiff/tlsComm.c.orig Mon Jul 9 11:24:15 2012
|
||||
+++ wmbiff/tlsComm.c Mon Jul 9 11:29:12 2012
|
||||
@@ -410,7 +410,7 @@ static void
|
||||
tls_check_certificate(struct connection_state *scs,
|
||||
const char *remote_hostname)
|
||||
{
|
||||
- int certstat;
|
||||
+ int certstat, status;
|
||||
const gnutls_datum *cert_list;
|
||||
int cert_list_size = 0;
|
||||
gnutls_x509_crt cert;
|
||||
@@ -419,16 +419,16 @@ tls_check_certificate(struct connection_state *scs,
|
||||
bad_certificate(scs, "Unable to get certificate from peer.\n");
|
||||
return; /* bad_cert will exit if -skip-certificate-check was not given */
|
||||
}
|
||||
- certstat = gnutls_certificate_verify_peers(scs->tls_state);
|
||||
- if (certstat == GNUTLS_E_NO_CERTIFICATE_FOUND) {
|
||||
+ certstat = gnutls_certificate_verify_peers2(scs->tls_state, &status);
|
||||
+ if (status == GNUTLS_E_NO_CERTIFICATE_FOUND) {
|
||||
bad_certificate(scs, "server presented no certificate.\n");
|
||||
#ifdef GNUTLS_CERT_CORRUPTED
|
||||
- } else if (certstat & GNUTLS_CERT_CORRUPTED) {
|
||||
+ } else if (status & GNUTLS_CERT_CORRUPTED) {
|
||||
bad_certificate(scs, "server's certificate is corrupt.\n");
|
||||
#endif
|
||||
- } else if (certstat & GNUTLS_CERT_REVOKED) {
|
||||
+ } else if (status & GNUTLS_CERT_REVOKED) {
|
||||
bad_certificate(scs, "server's certificate has been revoked.\n");
|
||||
- } else if (certstat & GNUTLS_CERT_INVALID) {
|
||||
+ } else if (status & GNUTLS_CERT_INVALID) {
|
||||
if (gnutls_certificate_type_get(scs->tls_state) == GNUTLS_CRT_X509) {
|
||||
/* bad_certificate(scs, "server's certificate is not trusted.\n"
|
||||
"there may be a problem with the certificate stored in your certfile\n"); */
|
||||
@@ -438,14 +438,14 @@ tls_check_certificate(struct connection_state *scs,
|
||||
"there may be a problem with the certificate stored in your certfile\n");
|
||||
}
|
||||
#if defined(GNUTLS_CERT_SIGNER_NOT_FOUND)
|
||||
- } else if (certstat & GNUTLS_CERT_SIGNER_NOT_FOUND) {
|
||||
+ } else if (status & GNUTLS_CERT_SIGNER_NOT_FOUND) {
|
||||
TDM(DEBUG_INFO, "server's certificate is not signed.\n");
|
||||
TDM(DEBUG_INFO,
|
||||
"to verify that a certificate is trusted, use the certfile option.\n");
|
||||
#endif
|
||||
|
||||
#if defined(GNUTLS_CERT_NOT_TRUSTED)
|
||||
- } else if (certstat & GNUTLS_CERT_NOT_TRUSTED) {
|
||||
+ } else if (status & GNUTLS_CERT_NOT_TRUSTED) {
|
||||
TDM(DEBUG_INFO, "server's certificate is not trusted.\n");
|
||||
TDM(DEBUG_INFO,
|
||||
"to verify that a certificate is trusted, use the certfile option.\n");
|
@ -1,5 +1,5 @@
|
||||
@comment $OpenBSD: PLIST,v 1.5 2004/09/15 09:09:45 espie Exp $
|
||||
bin/wmbiff
|
||||
@comment $OpenBSD: PLIST,v 1.6 2012/07/09 09:34:26 ajacoutot Exp $
|
||||
@bin bin/wmbiff
|
||||
@comment lib/wmbiff/
|
||||
@comment lib/wmbiff/security.debian.rb
|
||||
@man man/man1/wmbiff.1
|
||||
|
Loading…
Reference in New Issue
Block a user