Skip to content

Commit d59fd02

Browse files
committed
mod_session_crypto: Initialise SSL in the post config hook.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@645244 13f79535-47bb-0310-9956-ffa450edef68
1 parent e6e57e2 commit d59fd02

2 files changed

Lines changed: 13 additions & 3 deletions

File tree

CHANGES

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
Changes with Apache 2.3.0
33
[ When backported to 2.2.x, remove entry from this file ]
44

5+
*) mod_session_crypto: Initialise SSL in the post config hook.
6+
[Ruediger Pluem, Graham Leggett]
7+
58
*) mod_session_dbd: Add a session implementation capable of storing
69
session information in a SQL database via the dbd interface. Useful
710
for sites where session privacy is important. [Graham Leggett]

modules/session/mod_session_crypto.c

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,15 @@ AP_DECLARE(int) ap_session_crypto_decode(request_rec * r, session_rec * z)
316316

317317
}
318318

319+
/**
320+
* Initialise the SSL in the post_config hook.
321+
*/
322+
AP_DECLARE(int) ap_session_crypto_init(apr_pool_t *p, apr_pool_t *plog,
323+
apr_pool_t *ptemp, server_rec *s)
324+
{
325+
apr_ssl_init();
326+
return OK;
327+
}
319328

320329

321330

@@ -328,9 +337,6 @@ static void *create_session_crypto_dir_config(apr_pool_t * p, char *dummy)
328337
new->cipher = DEFAULT_CIPHER;
329338
new->digest = DEFAULT_DIGEST;
330339

331-
/* initialise SSL */
332-
apr_ssl_init();
333-
334340
return (void *) new;
335341
}
336342

@@ -453,6 +459,7 @@ static void register_hooks(apr_pool_t * p)
453459
{
454460
ap_hook_session_encode(ap_session_crypto_encode, NULL, NULL, APR_HOOK_LAST);
455461
ap_hook_session_decode(ap_session_crypto_decode, NULL, NULL, APR_HOOK_FIRST);
462+
ap_hook_post_config(ap_session_crypto_init, NULL, NULL, APR_HOOK_FIRST);
456463
}
457464

458465
module AP_MODULE_DECLARE_DATA session_crypto_module =

0 commit comments

Comments
 (0)