[gnutls-dev] Building gnutls from CVS without opencdk
Andrew McDonald
andrew at mcdonald.org.uk
Fri Feb 8 22:52:01 CET 2002
Nikos et al.,
I built gnutls from CVS without opencdk support. However, I ended up
with some unresolved symbols when linking my program. The attached diff
fixes these.
Also, I had some trouble with x509_ASN.y:
gcc -DHAVE_CONFIG_H -I. -I. -I.. -O2 -pipe -Wp,-MD,.deps/x509_ASN.pp -c
x509_ASN.c -fPIC -DPIC -o .libs/x509_ASN.lo
x509_ASN.y: In function `yyparse':
x509_ASN.y:279: parse error before }'
x509_ASN.y:339: parse error before }'
x509_ASN.y:341: parse error before }'
x509_ASN.y:382: parse error before `const'
x509_ASN.y:410: `c' undeclared (first use in this function)
x509_ASN.y:410: (Each undeclared identifier is reported only once
x509_ASN.y:410: for each function it appears in.)
x509_ASN.y:421: `counter' undeclared (first use in this function)
x509_ASN.y:428: `string' undeclared (first use in this function)
x509_ASN.y:440: `k' undeclared (first use in this function)
x509_ASN.y:449: `key_word' undeclared (first use in this function)
x509_ASN.y:450: `key_word_token' undeclared (first use in this function)
x509_ASN.y:475: parse error before `int'
x509_ASN.y:477: `pointer' undeclared (first use in this function)
x509_ASN.y:480: `file_name' undeclared (first use in this function)
x509_ASN.y:527: parse error before `int'
x509_ASN.y:551: `result' undeclared (first use in this function)
Somehow I eventually created a x509_ASN.tab.c. Copying this to
x509_ASN.c solved it. I'm using Debian unstables bison 1.32-3.
Regards,
Andrew
--
Andrew McDonald
E-mail: andrew at mcdonald.org.uk
http://www.mcdonald.org.uk/andrew/
-------------- next part --------------
Index: lib/auth_cert.c
===================================================================
RCS file: /cvs/gnutls/gnutls/lib/auth_cert.c,v
retrieving revision 2.9
diff -u -r2.9 auth_cert.c
--- lib/auth_cert.c 2002/02/07 20:58:47 2.9
+++ lib/auth_cert.c 2002/02/08 21:38:07
@@ -795,6 +795,7 @@
return 0;
}
+#ifdef HAVE_LIBOPENCDK
#define CLEAR_CERTS for(x=0;x<peer_certificate_list_size;x++) gnutls_free_cert(peer_certificate_list[x])
int _gnutls_proc_openpgp_server_certificate(GNUTLS_STATE state,
@@ -918,15 +919,17 @@
return 0;
}
+#endif /* HAVE_LIBOPENCDK */
-
int _gnutls_proc_cert_server_certificate(GNUTLS_STATE state, opaque * data,
int data_size)
{
switch (state->security_parameters.cert_type) {
+#ifdef HAVE_LIBOPENCDK
case GNUTLS_CRT_OPENPGP:
return _gnutls_proc_openpgp_server_certificate(state, data,
data_size);
+#endif /* HAVE_LIBOPENCDK */
case GNUTLS_CRT_X509:
return _gnutls_proc_x509_server_certificate(state, data,
data_size);
@@ -1119,6 +1122,7 @@
info->
raw_certificate_list[0]);
break;
+#ifdef HAVE_LIBOPENCDK
case GNUTLS_CRT_OPENPGP:
ret =
_gnutls_openpgp_cert2gnutls_cert(&peer_cert,
@@ -1126,7 +1130,7 @@
raw_certificate_list
[0]);
break;
-
+#endif /* HAVE_LIBOPENCDK */
default:
gnutls_assert();
return GNUTLS_E_UNKNOWN_ERROR;
Index: lib/auth_dhe.c
===================================================================
RCS file: /cvs/gnutls/gnutls/lib/auth_dhe.c,v
retrieving revision 1.4
diff -u -r1.4 auth_dhe.c
--- lib/auth_dhe.c 2002/02/03 18:30:25 1.4
+++ lib/auth_dhe.c 2002/02/08 21:38:08
@@ -341,6 +341,7 @@
return ret;
}
break;
+#ifdef HAVE_LIBOPENCDK
case GNUTLS_CRT_OPENPGP:
if ((ret =
_gnutls_openpgp_cert2gnutls_cert( &peer_cert,
@@ -349,7 +350,7 @@
return ret;
}
break;
-
+#endif /* HAVE_LIBOPENCDK */
default:
gnutls_assert();
return GNUTLS_E_UNKNOWN_ERROR;
Index: lib/auth_rsa.c
===================================================================
RCS file: /cvs/gnutls/gnutls/lib/auth_rsa.c,v
retrieving revision 2.54
diff -u -r2.54 auth_rsa.c
--- lib/auth_rsa.c 2002/02/03 18:30:25 2.54
+++ lib/auth_rsa.c 2002/02/08 21:38:09
@@ -86,6 +86,7 @@
return ret;
}
break;
+#ifdef HAVE_LIBOPENCDK
case GNUTLS_CRT_OPENPGP:
if ((ret =
_gnutls_openpgp_cert2gnutls_cert( &peer_cert,
@@ -94,7 +95,7 @@
return ret;
}
break;
-
+#endif /* HAVE_LIBOPENCDK */
default:
gnutls_assert();
return GNUTLS_E_UNKNOWN_ERROR;
Index: lib/gnutls_cert.c
===================================================================
RCS file: /cvs/gnutls/gnutls/lib/gnutls_cert.c,v
retrieving revision 2.81
diff -u -r2.81 gnutls_cert.c
--- lib/gnutls_cert.c 2002/02/05 12:18:47 2.81
+++ lib/gnutls_cert.c 2002/02/08 21:38:10
@@ -296,6 +296,7 @@
state->gnutls_internals.server_cert_callback = func;
}
+#ifdef HAVE_LIBOPENCDK
/*-
* _gnutls_openpgp_cert_verify_peers - This function returns the peer's certificate status
* @state: is a gnutls state
@@ -353,6 +354,7 @@
return verify;
}
+#endif /* HAVE_LIBOPENCDK */
/**
* gnutls_certificate_verify_peers - This function returns the peer's certificate verification status
@@ -382,8 +384,10 @@
switch( gnutls_cert_type_get( state)) {
case GNUTLS_CRT_X509:
return _gnutls_x509_cert_verify_peers( state);
+#ifdef HAVE_LIBOPENCDK
case GNUTLS_CRT_OPENPGP:
return _gnutls_openpgp_cert_verify_peers( state);
+#endif /* HAVE_LIBOPENCDK */
default:
return GNUTLS_E_INVALID_REQUEST;
}
More information about the Gnutls-devel
mailing list