From d7a2be62a3a4483caeb0bf24a8845590cd0b01b2 Mon Sep 17 00:00:00 2001 From: Anthony Hu Date: Tue, 21 Jan 2025 18:00:47 -0500 Subject: [PATCH] Add some comments to explain return codes. --- wolfssl/ssl.h | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/wolfssl/ssl.h b/wolfssl/ssl.h index 5ec54d106b..ea060577a9 100644 --- a/wolfssl/ssl.h +++ b/wolfssl/ssl.h @@ -2968,23 +2968,49 @@ enum { /* ssl Constants */ (WOLFSSL_SESS_CACHE_NO_INTERNAL_STORE | WOLFSSL_SESS_CACHE_NO_INTERNAL_LOOKUP), - /* These values match OpenSSL values for corresponding names. */ + /* These values match OpenSSL values for corresponding names.*/ WOLFSSL_ERROR_SSL = 1, + + /* Operation did not complete; call this API again.*/ WOLFSSL_ERROR_WANT_READ = 2, + + /* Operation did not complete; call this API again.*/ WOLFSSL_ERROR_WANT_WRITE = 3, + + /* Operation did not complete; callback needs this API to be called again.*/ WOLFSSL_ERROR_WANT_X509_LOOKUP = 4, + + /* Some sort of sytem I/O error happened.*/ WOLFSSL_ERROR_SYSCALL = 5, + + /* The connection has been closed with a closure alert.*/ WOLFSSL_ERROR_ZERO_RETURN = 6, + + /* Underlying protocol connection not started yet, call this API again.*/ WOLFSSL_ERROR_WANT_CONNECT = 7, + + /* Underlying protocol connection not started yet, call this API again.*/ WOLFSSL_ERROR_WANT_ACCEPT = 8, + /* Close notify alert was sent to the peer.*/ WOLFSSL_SENT_SHUTDOWN = 1, + + /* Close notify or fatal error was received from the peer.*/ WOLFSSL_RECEIVED_SHUTDOWN = 2, + + /* Let library know that write buffer might move to different addresses.*/ WOLFSSL_MODE_ACCEPT_MOVING_WRITE_BUFFER = 4, + /* The handshake failed. */ WOLFSSL_R_SSL_HANDSHAKE_FAILURE = 101, + + /* The issuer CA certificate is unknown. */ WOLFSSL_R_TLSV1_ALERT_UNKNOWN_CA = 102, + + /* Unable to validate the certificate. */ WOLFSSL_R_SSLV3_ALERT_CERTIFICATE_UNKNOWN = 103, + + /* There was a problem parsing the certificate. */ WOLFSSL_R_SSLV3_ALERT_BAD_CERTIFICATE = 104, WOLF_PEM_BUFSIZE = 1024