| 29 | #define APLOG_MODULE_INDEX AP_CORE_MODULE_INDEX |
| 30 | |
| 31 | apr_status_t ap_init_ebcdic(apr_pool_t *pool) |
| 32 | { |
| 33 | apr_status_t rv; |
| 34 | |
| 35 | rv = apr_xlate_open(&ap_hdrs_to_ascii, "ISO-8859-1", APR_DEFAULT_CHARSET, pool); |
| 36 | if (rv) { |
| 37 | ap_log_error(APLOG_MARK, APLOG_ERR, rv, NULL, APLOGNO(00040) |
| 38 | "apr_xlate_open() failed"); |
| 39 | return rv; |
| 40 | } |
| 41 | |
| 42 | rv = apr_xlate_open(&ap_hdrs_from_ascii, APR_DEFAULT_CHARSET, "ISO-8859-1", pool); |
| 43 | if (rv) { |
| 44 | ap_log_error(APLOG_MARK, APLOG_ERR, rv, NULL, APLOGNO(00041) |
| 45 | "apr_xlate_open() failed"); |
| 46 | return rv; |
| 47 | } |
| 48 | |
| 49 | rv = apr_MD5InitEBCDIC(ap_hdrs_to_ascii); |
| 50 | if (rv) { |
| 51 | ap_log_error(APLOG_MARK, APLOG_ERR, rv, NULL, APLOGNO(00042) |
| 52 | "apr_MD5InitEBCDIC() failed"); |
| 53 | return rv; |
| 54 | } |
| 55 | |
| 56 | rv = apr_base64init_ebcdic(ap_hdrs_to_ascii, ap_hdrs_from_ascii); |
| 57 | if (rv) { |
| 58 | ap_log_error(APLOG_MARK, APLOG_ERR, rv, NULL, APLOGNO(00043) |
| 59 | "apr_base64init_ebcdic() failed"); |
| 60 | return rv; |
| 61 | } |
| 62 | |
| 63 | rv = apr_SHA1InitEBCDIC(ap_hdrs_to_ascii); |
| 64 | if (rv) { |
| 65 | ap_log_error(APLOG_MARK, APLOG_ERR, rv, NULL, APLOGNO(00044) |
| 66 | "apr_SHA1InitEBCDIC() failed"); |
| 67 | return rv; |
| 68 | } |
| 69 | |
| 70 | return APR_SUCCESS; |
| 71 | } |
| 72 | |
| 73 | void ap_xlate_proto_to_ascii(char *buffer, apr_size_t len) |
| 74 | { |