doxygen: move addtogroup closures to include more elements

Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
diff --git a/include/mbedtls/x509_crt.h b/include/mbedtls/x509_crt.h
index e157efa..51883dc 100644
--- a/include/mbedtls/x509_crt.h
+++ b/include/mbedtls/x509_crt.h
@@ -956,7 +956,6 @@
 #endif /* MBEDTLS_X509_CRT_PARSE_C */
 
 /** \} name Structures and functions for parsing and writing X.509 certificates */
-/** \} addtogroup x509_module */
 
 #if defined(MBEDTLS_X509_CRT_WRITE_C)
 /**
@@ -1186,6 +1185,8 @@
 #endif /* MBEDTLS_PEM_WRITE_C */
 #endif /* MBEDTLS_X509_CRT_WRITE_C */
 
+/** \} addtogroup x509_module */
+
 #ifdef __cplusplus
 }
 #endif