| 8516 | } |
| 8517 | |
| 8518 | TSReturnCode |
| 8519 | TSSslSessionInsert(const TSSslSessionID *session_id, TSSslSession add_session, TSSslConnection ssl_conn) |
| 8520 | { |
| 8521 | // Don't insert if there is no session id or the cache is not yet set up |
| 8522 | if (session_id && session_cache) { |
| 8523 | if (dbg_ctl_ssl_session_cache_insert.on()) { |
| 8524 | const SSLSessionID *sid = reinterpret_cast<const SSLSessionID *>(session_id); |
| 8525 | char buf[sid->len * 2 + 1]; |
| 8526 | sid->toString(buf, sizeof(buf)); |
| 8527 | DbgPrint(dbg_ctl_ssl_session_cache_insert, "TSSslSessionInsert: Inserting session '%s' ", buf); |
| 8528 | } |
| 8529 | SSL_SESSION *session = reinterpret_cast<SSL_SESSION *>(add_session); |
| 8530 | SSL *ssl = reinterpret_cast<SSL *>(ssl_conn); |
| 8531 | session_cache->insertSession(reinterpret_cast<const SSLSessionID &>(*session_id), session, ssl); |
| 8532 | // insertSession returns void, assume all went well |
| 8533 | return TS_SUCCESS; |
| 8534 | } else { |
| 8535 | return TS_ERROR; |
| 8536 | } |
| 8537 | } |
| 8538 | |
| 8539 | TSReturnCode |
| 8540 | TSSslSessionRemove(const TSSslSessionID *session_id) |
nothing calls this directly
no test coverage detected