| 322 | |
| 323 | |
| 324 | string error_string(unsigned long code) |
| 325 | { |
| 326 | // SSL library guarantees to stay within 120 bytes. |
| 327 | char buffer[128]; |
| 328 | |
| 329 | ERR_error_string_n(code, buffer, sizeof(buffer)); |
| 330 | string s(buffer); |
| 331 | |
| 332 | if (code == SSL_ERROR_SYSCALL) { |
| 333 | s += error_string(ERR_get_error()); |
| 334 | } |
| 335 | |
| 336 | return s; |
| 337 | } |
| 338 | |
| 339 | |
| 340 | #if OPENSSL_VERSION_NUMBER >= 0x0090800fL && !defined(OPENSSL_NO_ECDH) |
no outgoing calls
no test coverage detected