* Prints the SSL library error information. */
| 92 | * Prints the SSL library error information. |
| 93 | */ |
| 94 | void ssl_log_ssl_error(const char *file, int line, int level, server_rec *s) |
| 95 | { |
| 96 | unsigned long e; |
| 97 | const char *data; |
| 98 | int flags; |
| 99 | |
| 100 | while ((e = modssl_ERR_peek_error_data(&data, &flags))) { |
| 101 | const char *annotation; |
| 102 | char err[256]; |
| 103 | |
| 104 | if (!(flags & ERR_TXT_STRING)) { |
| 105 | data = NULL; |
| 106 | } |
| 107 | |
| 108 | ERR_error_string_n(e, err, sizeof err); |
| 109 | annotation = ssl_log_annotation(err); |
| 110 | |
| 111 | ap_log_error(file, line, APLOG_MODULE_INDEX, level, 0, s, |
| 112 | "SSL Library Error: %s%s%s%s%s%s", |
| 113 | /* %s */ |
| 114 | err, |
| 115 | /* %s%s%s */ |
| 116 | data ? " (" : "", data ? data : "", data ? ")" : "", |
| 117 | /* %s%s */ |
| 118 | annotation ? " -- " : "", |
| 119 | annotation ? annotation : ""); |
| 120 | |
| 121 | /* Pop the error off the stack: */ |
| 122 | ERR_get_error(); |
| 123 | } |
| 124 | } |
| 125 | |
| 126 | static void ssl_log_cert_error(const char *file, int line, int level, |
| 127 | apr_status_t rv, const server_rec *s, |
no test coverage detected