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

Function ssl_scache_retrieve

modules/ssl/ssl_scache.c:147–174  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

145}
146
147SSL_SESSION *ssl_scache_retrieve(server_rec *s, IDCONST UCHAR *id, int idlen,
148 apr_pool_t *p)
149{
150 SSLModConfigRec *mc = myModConfig(s);
151 unsigned char dest[MODSSL_SESSION_MAX_DER];
152 unsigned int destlen = MODSSL_SESSION_MAX_DER;
153 const unsigned char *ptr;
154 apr_status_t rv;
155
156 if (mc->sesscache->flags & AP_SOCACHE_FLAG_NOTMPSAFE) {
157 ssl_mutex_on(s);
158 }
159
160 rv = mc->sesscache->retrieve(mc->sesscache_context, s, id, idlen,
161 dest, &destlen, p);
162
163 if (mc->sesscache->flags & AP_SOCACHE_FLAG_NOTMPSAFE) {
164 ssl_mutex_off(s);
165 }
166
167 if (rv != APR_SUCCESS) {
168 return NULL;
169 }
170
171 ptr = dest;
172
173 return d2i_SSL_SESSION(NULL, &ptr, destlen);
174}
175
176void ssl_scache_remove(server_rec *s, IDCONST UCHAR *id, int idlen,
177 apr_pool_t *p)

Callers 1

Calls 2

ssl_mutex_onFunction · 0.85
ssl_mutex_offFunction · 0.85

Tested by

no test coverage detected