| 353 | |
| 354 | |
| 355 | string error_string(unsigned long code) |
| 356 | { |
| 357 | // SSL library guarantees to stay within 120 bytes. |
| 358 | char buffer[128]; |
| 359 | |
| 360 | ERR_error_string_n(code, buffer, sizeof(buffer)); |
| 361 | string s(buffer); |
| 362 | |
| 363 | if (code == SSL_ERROR_SYSCALL) { |
| 364 | s += error_string(ERR_get_error()); |
| 365 | } |
| 366 | |
| 367 | return s; |
| 368 | } |
| 369 | |
| 370 | |
| 371 | #if OPENSSL_VERSION_NUMBER >= 0x0090800fL && !defined(OPENSSL_NO_ECDH) |
no outgoing calls
no test coverage detected