Various fixes to doxygen API generation

 * Fixed incorrect file definitions
 * Fixed accidental tag problems in ecjpake.h
 * Corrected function naming in X.509 module definition
diff --git a/doxygen/input/doc_x509.h b/doxygen/input/doc_x509.h
index 7acd90f..315f0e3 100644
--- a/doxygen/input/doc_x509.h
+++ b/doxygen/input/doc_x509.h
@@ -23,18 +23,20 @@
 /**
  * @addtogroup x509_module X.509 module
  *
- * The X.509 module provides X.509 support which includes:
- * - X.509 certificate (CRT) reading (see \c x509parse_crt() and
- *   \c x509parse_crtfile()).
- * - X.509 certificate revocation list (CRL) reading (see \c x509parse_crl()
- *   and\c x509parse_crlfile()).
- * - X.509 (RSA and ECC) private key reading (see \c x509parse_key() and
- *   \c x509parse_keyfile()).
- * - X.509 certificate signature verification (see \c x509parse_verify())
- * - X.509 certificate writing and certificate request writing (see
- *   \c mbedtls_x509write_crt_der() and \c mbedtls_x509write_csr_der()).
+ * The X.509 module provides X.509 support for reading, writing and verification
+ * of certificates.
+ * In summary:
+ *   - X.509 certificate (CRT) reading (see \c mbedtls_x509_crt_parse(),
+ *     \c mbedtls_x509_crt_parse_der(), \c mbedtls_x509_crt_parse_file()).
+ *   - X.509 certificate revocation list (CRL) reading (see
+ *     \c mbedtls_x509_crl_parse(), \c mbedtls_x509_crl_parse_der(),
+ *     and \c mbedtls_x509_crl_parse_file()).
+ *   - X.509 certificate signature verification (see \c
+ *     mbedtls_x509_crt_verify() and \c mbedtls_x509_crt_verify_with_profile().
+ *   - X.509 certificate writing and certificate request writing (see
+ *     \c mbedtls_x509write_crt_der() and \c mbedtls_x509write_csr_der()).
  *
  * This module can be used to build a certificate authority (CA) chain and
  * verify its signature. It is also used to generate Certificate Signing
- * Requests and X509 certificates just as a CA would do.
+ * Requests and X.509 certificates just as a CA would do.
  */
diff --git a/include/mbedtls/compat-1.3.h b/include/mbedtls/compat-1.3.h
index 1ddfff8..27abbd9 100644
--- a/include/mbedtls/compat-1.3.h
+++ b/include/mbedtls/compat-1.3.h
@@ -1,7 +1,8 @@
 /**
- * \file config.h
+ * \file compat-1.3.h
  *
- * \brief Compatibility names (set of defines)
+ * \brief Compatibility definitions for using mbed TLS with client code written
+ *  for the PolarSSL naming conventions.
  *
  * \deprecated Use the new names directly instead
  *
diff --git a/include/mbedtls/config.h b/include/mbedtls/config.h
index 3e39998..d710f2d 100644
--- a/include/mbedtls/config.h
+++ b/include/mbedtls/config.h
@@ -3,6 +3,10 @@
  *
  * \brief Configuration options (set of defines)
  *
+ *  This set of compile-time options may be used to enable
+ *  or disable features selectively, and reduce the global
+ *  memory footprint.
+ *
  *  Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
  *  SPDX-License-Identifier: Apache-2.0
  *
@@ -21,11 +25,6 @@
  *  This file is part of mbed TLS (https://tls.mbed.org)
  */
 
-/*
- * This set of compile-time options may be used to enable
- * or disable features selectively, and reduce the global
- * memory footprint.
- */
 #ifndef MBEDTLS_CONFIG_H
 #define MBEDTLS_CONFIG_H
 
diff --git a/include/mbedtls/ecjpake.h b/include/mbedtls/ecjpake.h
index 3bbf27e..b7b6160 100644
--- a/include/mbedtls/ecjpake.h
+++ b/include/mbedtls/ecjpake.h
@@ -64,7 +64,7 @@
  *
  * In order to benefit from this symmetry, we choose a different naming
  * convetion from the Thread v1.0 spec. Correspondance is indicated in the
- * description as a pair C: <client name>, S: <server name>
+ * description as a pair C: client name, S: server name
  */
 typedef struct
 {
diff --git a/include/mbedtls/md.h b/include/mbedtls/md.h
index 77c2c6f..b902355 100644
--- a/include/mbedtls/md.h
+++ b/include/mbedtls/md.h
@@ -1,5 +1,5 @@
 /**
- * \file mbedtls_md.h
+ * \file md.h
  *
  * \brief Generic message digest wrapper
  *
diff --git a/include/mbedtls/md2.h b/include/mbedtls/md2.h
index 51d7948..0f93fbf 100644
--- a/include/mbedtls/md2.h
+++ b/include/mbedtls/md2.h
@@ -1,5 +1,5 @@
 /**
- * \file mbedtls_md2.h
+ * \file md2.h
  *
  * \brief MD2 message digest algorithm (hash function)
  *
diff --git a/include/mbedtls/md4.h b/include/mbedtls/md4.h
index 12cb81d..45214d4 100644
--- a/include/mbedtls/md4.h
+++ b/include/mbedtls/md4.h
@@ -1,5 +1,5 @@
 /**
- * \file mbedtls_md4.h
+ * \file md4.h
  *
  * \brief MD4 message digest algorithm (hash function)
  *
diff --git a/include/mbedtls/md5.h b/include/mbedtls/md5.h
index 09d8a94..5a64061 100644
--- a/include/mbedtls/md5.h
+++ b/include/mbedtls/md5.h
@@ -1,5 +1,5 @@
 /**
- * \file mbedtls_md5.h
+ * \file md5.h
  *
  * \brief MD5 message digest algorithm (hash function)
  *
diff --git a/include/mbedtls/ripemd160.h b/include/mbedtls/ripemd160.h
index a92d384..7083fc8 100644
--- a/include/mbedtls/ripemd160.h
+++ b/include/mbedtls/ripemd160.h
@@ -1,5 +1,5 @@
 /**
- * \file mbedtls_ripemd160.h
+ * \file ripemd160.h
  *
  * \brief RIPE MD-160 message digest
  *
diff --git a/include/mbedtls/sha1.h b/include/mbedtls/sha1.h
index 2b74d06..7a67c6c 100644
--- a/include/mbedtls/sha1.h
+++ b/include/mbedtls/sha1.h
@@ -1,5 +1,5 @@
 /**
- * \file mbedtls_sha1.h
+ * \file sha1.h
  *
  * \brief SHA-1 cryptographic hash function
  *
diff --git a/include/mbedtls/sha256.h b/include/mbedtls/sha256.h
index bc8b226..f8041ad 100644
--- a/include/mbedtls/sha256.h
+++ b/include/mbedtls/sha256.h
@@ -1,5 +1,5 @@
 /**
- * \file mbedtls_sha256.h
+ * \file sha256.h
  *
  * \brief SHA-224 and SHA-256 cryptographic hash function
  *
diff --git a/include/mbedtls/sha512.h b/include/mbedtls/sha512.h
index 9462764..627694f 100644
--- a/include/mbedtls/sha512.h
+++ b/include/mbedtls/sha512.h
@@ -1,5 +1,5 @@
 /**
- * \file mbedtls_sha512.h
+ * \file sha512.h
  *
  * \brief SHA-384 and SHA-512 cryptographic hash function
  *
diff --git a/include/mbedtls/x509_crl.h b/include/mbedtls/x509_crl.h
index c50c4ef..9490964 100644
--- a/include/mbedtls/x509_crl.h
+++ b/include/mbedtls/x509_crl.h
@@ -1,5 +1,5 @@
 /**
- * \file mbedtls_x509_crl.h
+ * \file x509_crl.h
  *
  * \brief X.509 certificate revocation list parsing
  *
@@ -100,7 +100,7 @@
  *
  * \param chain    points to the start of the chain
  * \param buf      buffer holding the CRL data in DER format
- *                 (including the terminating null byte for PEM data)
+ * \param buflen   size of the buffer
  *
  * \return         0 if successful, or a specific X509 or PEM error code
  */
diff --git a/include/mbedtls/x509_crt.h b/include/mbedtls/x509_crt.h
index 294f36a..fe821d1 100644
--- a/include/mbedtls/x509_crt.h
+++ b/include/mbedtls/x509_crt.h
@@ -1,5 +1,5 @@
 /**
- * \file mbedtls_x509_crt.h
+ * \file x509_crt.h
  *
  * \brief X.509 certificate parsing and writing
  *
diff --git a/include/mbedtls/x509_csr.h b/include/mbedtls/x509_csr.h
index 98c75bc..34998a3 100644
--- a/include/mbedtls/x509_csr.h
+++ b/include/mbedtls/x509_csr.h
@@ -1,5 +1,5 @@
 /**
- * \file mbedtls_x509_csr.h
+ * \file x509_csr.h
  *
  * \brief X.509 certificate signing request parsing and writing
  *