Skip to content

Commit

Permalink
Merge pull request #8365 from anhu/retcode_comm
Browse files Browse the repository at this point in the history
Add some comments to explain return codes.
  • Loading branch information
dgarske authored Jan 21, 2025
2 parents c456cbd + d7a2be6 commit efb8a22
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion wolfssl/ssl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit efb8a22

Please sign in to comment.