* This callback function is executed by OpenSSL whenever a * SSL_SESSION is looked up in the internal OpenSSL cache and it * was not found. We use this to lookup the SSL_SESSION in the * inter-process disk-cache where it was perhaps stored by one * of our other Apache pre-forked server processes. */
| 1952 | * of our other Apache pre-forked server processes. |
| 1953 | */ |
| 1954 | SSL_SESSION *ssl_callback_GetSessionCacheEntry(SSL *ssl, |
| 1955 | IDCONST unsigned char *id, |
| 1956 | int idlen, int *do_copy) |
| 1957 | { |
| 1958 | /* Get Apache context back through OpenSSL context */ |
| 1959 | conn_rec *conn = (conn_rec *)SSL_get_app_data(ssl); |
| 1960 | server_rec *s = mySrvFromConn(conn); |
| 1961 | SSL_SESSION *session; |
| 1962 | |
| 1963 | /* |
| 1964 | * Try to retrieve the SSL_SESSION from the inter-process cache |
| 1965 | */ |
| 1966 | session = ssl_scache_retrieve(s, id, idlen, conn->pool); |
| 1967 | |
| 1968 | ssl_session_log(s, "GET", id, idlen, |
| 1969 | session ? "FOUND" : "MISSED", |
| 1970 | session ? "reuse" : "renewal", 0); |
| 1971 | |
| 1972 | /* |
| 1973 | * Return NULL or the retrieved SSL_SESSION. But indicate (by |
| 1974 | * setting do_copy to 0) that the reference count on the |
| 1975 | * SSL_SESSION should not be incremented by the SSL library, |
| 1976 | * because we will no longer hold a reference to it ourself. |
| 1977 | */ |
| 1978 | *do_copy = 0; |
| 1979 | |
| 1980 | return session; |
| 1981 | } |
| 1982 | |
| 1983 | /* |
| 1984 | * This callback function is executed by OpenSSL whenever a |
nothing calls this directly
no test coverage detected