MCPcopy Create free account
hub / github.com/apache/httpd / ssl_callback_GetSessionCacheEntry

Function ssl_callback_GetSessionCacheEntry

modules/ssl/ssl_engine_kernel.c:1954–1981  ·  view source on GitHub ↗

* 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. */

Source from the content-addressed store, hash-verified

1952 * of our other Apache pre-forked server processes.
1953 */
1954SSL_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

Callers

nothing calls this directly

Calls 2

ssl_scache_retrieveFunction · 0.85
ssl_session_logFunction · 0.85

Tested by

no test coverage detected