SSL error handling *************/
| 152 | |
| 153 | /****** SSL error handling *************/ |
| 154 | const char *SSL_error_string(int ssl_error, int orig_ret) |
| 155 | { |
| 156 | switch (ssl_error) { |
| 157 | case SSL_ERROR_NONE: |
| 158 | return "No error"; |
| 159 | case SSL_ERROR_ZERO_RETURN: |
| 160 | return "SSL connection has been closed. SSL returned: SSL_ERROR_ZERO_RETURN"; |
| 161 | case SSL_ERROR_WANT_WRITE: |
| 162 | return "SSL I/O function returned SSL_ERROR_WANT_WRITE"; |
| 163 | case SSL_ERROR_WANT_READ: |
| 164 | return "SSL I/O function returned SSL_ERROR_WANT_READ"; |
| 165 | case SSL_ERROR_WANT_CONNECT: |
| 166 | return "SSL I/O function returned SSL_ERROR_WANT_CONNECT"; |
| 167 | case SSL_ERROR_WANT_ACCEPT: |
| 168 | return "SSL I/O function returned SSL_ERROR_WANT_ACCEPT"; |
| 169 | case SSL_ERROR_WANT_X509_LOOKUP: |
| 170 | return "SSL I/O function returned SSL_ERROR_WANT_X509_LOOKUP"; |
| 171 | case SSL_ERROR_SSL: |
| 172 | return "SSL protocol error. SSL I/O function returned SSL_ERROR_SSL"; |
| 173 | case SSL_ERROR_SYSCALL: |
| 174 | if (orig_ret < 0) { /* not EOF */ |
| 175 | return strerror(errno); |
| 176 | } else { /* EOF */ |
| 177 | return "Non-recoverable I/O error occurred. SSL I/O function returned SSL_ERROR_SYSCALL"; |
| 178 | } |
| 179 | } |
| 180 | return "Unknown SSL Error."; |
| 181 | } |
| 182 | |
| 183 | SSL* SSL_new_client() |
| 184 | { |
no outgoing calls
no test coverage detected