mbedtls_ecp_write_key: document that this function doesn't detect unset data
Fixes #8803.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
diff --git a/include/mbedtls/ecp.h b/include/mbedtls/ecp.h
index 047e494..0c23f5d 100644
--- a/include/mbedtls/ecp.h
+++ b/include/mbedtls/ecp.h
@@ -1295,6 +1295,10 @@
* See the description of the \p buflen parameter for
* how to calculate the nominal length.
*
+ * \note If the private key was not set in \p key,
+ * the output is unspecified. Future versions
+ * may return an error in that case.
+ *
* \param key The private key.
* \param buf The output buffer for containing the binary representation
* of the key.