summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/auth_cert.c22
-rw-r--r--lib/debug.c6
2 files changed, 6 insertions, 22 deletions
diff --git a/lib/auth_cert.c b/lib/auth_cert.c
index 4edae862a9..8920d81fc3 100644
--- a/lib/auth_cert.c
+++ b/lib/auth_cert.c
@@ -40,6 +40,7 @@
#include <gnutls_pk.h>
#include <gnutls_x509.h>
#include <gnutls_openpgp.h>
+#include "debug.h"
/* Copies data from a internal certificate struct (gnutls_cert) to
* exported certificate struct (CERTIFICATE_AUTH_INFO)
@@ -668,8 +669,8 @@ int _gnutls_gen_x509_server_certificate(GNUTLS_STATE state, opaque ** data)
ret = 3;
for (i = 0; i < apr_cert_list_length; i++) {
ret += apr_cert_list[i].raw.size + 3;
- /* hold size
- * for uint24 */
+ /* hold size for uint24
+ * and the certificate */
}
(*data) = gnutls_malloc(ret);
@@ -687,23 +688,6 @@ int _gnutls_gen_x509_server_certificate(GNUTLS_STATE state, opaque ** data)
}
pdatasize = ret;
-#if 0
- /* read the rsa parameters now, since later we will
- * not know which certificate we used!
- */
- if (i != 0) /* if we parsed at least one certificate */
- ret =
- _gnutls_get_private_rsa_params(state->gnutls_key,
- apr_pkey);
- else
- ret = 0;
-
- if (ret < 0) {
- gnutls_assert();
- return ret;
- }
-#endif
-
return pdatasize;
}
diff --git a/lib/debug.c b/lib/debug.c
index 8e048153d2..870cc0230d 100644
--- a/lib/debug.c
+++ b/lib/debug.c
@@ -139,11 +139,11 @@ static char str[512];
}
#endif
-#ifdef X509_DEBUG
-int gnutls_x509_extract_certificate_dn( const gnutls_datum*, gnutls_dn*);
+#ifdef DEBUG
+int gnutls_x509_extract_certificate_dn( const gnutls_datum*, gnutls_x509_dn*);
const char* GET_CN( gnutls_datum cert) {
-static gnutls_dn dn;
+static gnutls_x509_dn dn;
if (gnutls_x509_extract_certificate_dn( &cert, &dn) >= 0)
return &dn.common_name[0]; /* FIXME */