On Thu,  4 Apr 2013 at 21:49:34 +0300, Gabriel VLASIU wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA512
> 
> On Thu, 4 Apr 2013, Carlos R. Mafra wrote:
> 
> > Commenting those lines are not enough:
> > 
> > /home/mafra/git-repos/dockapps/wmbiff/wmbiff/tlsComm.c:424: undefined 
> > reference to `gnutls_certificate_verify_peers'
> > gnutls-common.o: In function `print_cert_vrfy':
> > /home/mafra/git-repos/dockapps/wmbiff/wmbiff/gnutls-common.c:340: undefined 
> > reference to `gnutls_certificate_verify_peers'
> > collect2: error: ld returned 1 exit status
> > 
> > Thanks for the help and suggestion, but I'm afraid I have no time to
> > pursue this now.
> change:
> certstat = gnutls_certificate_verify_peers(scs->tls_state);
> to:
> gnutls_certificate_verify_peers2(scs->tls_state, &certstat);
> To avoid a warning also change int certstat to unsigned int certstat.

Thanks for the help!

It's necessary to change one more instance too, the diff below makes it
compile again.

Of course, one should do some autoconf magic to add the appropriate
#ifdef's to turn this into an acceptable patch.

diff --git a/wmbiff/wmbiff/gnutls-common.c b/wmbiff/wmbiff/gnutls-common.c
index db6bd17..d8b51d5 100644
--- a/wmbiff/wmbiff/gnutls-common.c
+++ b/wmbiff/wmbiff/gnutls-common.c
@@ -4,7 +4,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <gnutls/gnutls.h>
-#include <gnutls/extra.h>
+//#include <gnutls/extra.h>
 #include <gnutls/x509.h>
 #include <gnutls/openpgp.h>
 #include <time.h>
@@ -337,7 +337,8 @@ void print_cert_vrfy(gnutls_session session)
 {
 
        int status;
-       status = gnutls_certificate_verify_peers(session);
+//     status = gnutls_certificate_verify_peers(session);
+       gnutls_certificate_verify_peers2(session, &status);
        printf("\n");
 
        if (status == GNUTLS_E_NO_CERTIFICATE_FOUND) {
@@ -638,8 +639,8 @@ void parse_comp(char **comp, int ncomp, int *comp_priority)
                                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;
+//                     if (strncasecmp(comp[i], "LZO", 3) == 0)
+//                             comp_priority[j++] = GNUTLS_COMP_LZO;
                }
                comp_priority[j] = 0;
        }
diff --git a/wmbiff/wmbiff/tlsComm.c b/wmbiff/wmbiff/tlsComm.c
index 05e6dd8..9aec152 100644
--- a/wmbiff/wmbiff/tlsComm.c
+++ b/wmbiff/wmbiff/tlsComm.c
@@ -421,7 +421,8 @@ 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);
+//     certstat = gnutls_certificate_verify_peers(scs->tls_state);
+       gnutls_certificate_verify_peers2(scs->tls_state, &certstat);
        if (certstat == GNUTLS_E_NO_CERTIFICATE_FOUND) {
                bad_certificate(scs, "server presented no certificate.\n");
 #ifdef GNUTLS_CERT_CORRUPTED


-- 
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.

Reply via email to