| 520 | */ |
| 521 | |
| 522 | char *modssl_SSL_SESSION_id2sz(IDCONST unsigned char *id, int idlen, |
| 523 | char *str, int strsize) |
| 524 | { |
| 525 | if (idlen > SSL_MAX_SSL_SESSION_ID_LENGTH) |
| 526 | idlen = SSL_MAX_SSL_SESSION_ID_LENGTH; |
| 527 | |
| 528 | /* We must ensure not to process more than what would fit in the |
| 529 | * destination buffer, including terminating NULL */ |
| 530 | if (idlen > (strsize-1) / 2) |
| 531 | idlen = (strsize-1) / 2; |
| 532 | |
| 533 | ap_bin2hex(id, idlen, str); |
| 534 | |
| 535 | return str; |
| 536 | } |
| 537 | |
| 538 | /* _________________________________________________________________ |
| 539 | ** |
no test coverage detected