summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTING.md7
1 files changed, 7 insertions, 0 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 7947f7e6d2..b8448c0412 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -169,6 +169,13 @@ from boolean functions to both the developer and the compiler. Note
that in the past the 'unsigned' type was used to distinguish boolean functions
and several of these still exist.
+## Selecting the right return value
+
+When selecting the return value for a TLS protocol parsing function
+a suggested approach is to check which alert fits best on that error
+(see `alert.c`), and then select from the error codes which are mapped
+to that alert (see `gnutls_error_to_alert()`). For more generic parsing
+errors consider using the `GNUTLS_E_RECEIVED_ILLEGAL_PARAMETER`.
# Usage of assert()