summaryrefslogtreecommitdiffstats
path: root/auth_mellon_config.c
diff options
context:
space:
mode:
authorolavmrk <olavmrk@a716ebb1-153a-0410-b759-cfb97c6a1b53>2008-10-27 11:08:57 +0000
committerolavmrk <olavmrk@a716ebb1-153a-0410-b759-cfb97c6a1b53>2008-10-27 11:08:57 +0000
commitb71e41f433a066ae17088c13c3ca28b089697dab (patch)
tree50a4c44a3f5140c75fec566773b5fe0d777763af /auth_mellon_config.c
parentaa2e53284c915af93da4320304c7c4427e536f27 (diff)
downloadmod_auth_mellon-b71e41f433a066ae17088c13c3ca28b089697dab.tar.gz
mod_auth_mellon-b71e41f433a066ae17088c13c3ca28b089697dab.tar.xz
mod_auth_mellon-b71e41f433a066ae17088c13c3ca28b089697dab.zip
Add support for IdP CA certificate and SP certificate.
Thanks to Emmanuel Dreyfus for this patch. git-svn-id: https://modmellon.googlecode.com/svn/trunk@31 a716ebb1-153a-0410-b759-cfb97c6a1b53
Diffstat (limited to 'auth_mellon_config.c')
-rw-r--r--auth_mellon_config.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/auth_mellon_config.c b/auth_mellon_config.c
index 250bb8f..e3f46bb 100644
--- a/auth_mellon_config.c
+++ b/auth_mellon_config.c
@@ -372,6 +372,13 @@ const command_rec auth_mellon_commands[] = {
"Full path to pem file with the private key for the SP."
),
AP_INIT_TAKE1(
+ "MellonSPCertFile",
+ ap_set_string_slot,
+ (void *)APR_OFFSETOF(am_dir_cfg_rec, sp_cert_file),
+ OR_AUTHCFG,
+ "Full path to pem file with certificate for the SP."
+ ),
+ AP_INIT_TAKE1(
"MellonIdPMetadataFile",
ap_set_string_slot,
(void *)APR_OFFSETOF(am_dir_cfg_rec, idp_metadata_file),
@@ -386,6 +393,13 @@ const command_rec auth_mellon_commands[] = {
"Full path to pem file with the public key for the IdP."
),
AP_INIT_TAKE1(
+ "MellonIdPCAFile",
+ ap_set_string_slot,
+ (void *)APR_OFFSETOF(am_dir_cfg_rec, idp_ca_file),
+ OR_AUTHCFG,
+ "Full path to pem file with CA chain for the IdP."
+ ),
+ AP_INIT_TAKE1(
"MellonEndpointPath",
am_set_endpoint_path,
NULL,
@@ -431,8 +445,10 @@ void *auth_mellon_dir_config(apr_pool_t *p, char *d)
dir->sp_metadata_file = NULL;
dir->sp_private_key_file = NULL;
+ dir->sp_cert_file = NULL;
dir->idp_metadata_file = NULL;
dir->idp_public_key_file = NULL;
+ dir->idp_ca_file = NULL;
apr_thread_mutex_create(&dir->server_mutex, APR_THREAD_MUTEX_DEFAULT, p);
@@ -515,6 +531,10 @@ void *auth_mellon_dir_merge(apr_pool_t *p, void *base, void *add)
add_cfg->sp_private_key_file :
base_cfg->sp_private_key_file);
+ new_cfg->sp_cert_file = (add_cfg->sp_cert_file ?
+ add_cfg->sp_cert_file :
+ base_cfg->sp_cert_file);
+
new_cfg->idp_metadata_file = (add_cfg->idp_metadata_file ?
add_cfg->idp_metadata_file :
base_cfg->idp_metadata_file);
@@ -523,6 +543,11 @@ void *auth_mellon_dir_merge(apr_pool_t *p, void *base, void *add)
add_cfg->idp_public_key_file :
base_cfg->idp_public_key_file);
+ new_cfg->idp_ca_file = (add_cfg->idp_ca_file ?
+ add_cfg->idp_ca_file :
+ base_cfg->idp_ca_file);
+
+
apr_thread_mutex_create(&new_cfg->server_mutex,
APR_THREAD_MUTEX_DEFAULT, p);