Skip to content

Commit 9ef0007

Browse files
committed
version 0.9.6: various corrections related to packaging
Signed-off-by: Hans Zandbelt <hans.zandbelt@zmartzone.eu>
1 parent 21d0b65 commit 9ef0007

File tree

7 files changed

+49
-10
lines changed

7 files changed

+49
-10
lines changed

ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
10/02/2018
2+
- various corrections related to packaging
3+
- version 0.9.6
4+
15
10/01/2018
26
- use non-binary security token as default WS-Trust source token
37
- support adding the target token in a POST parameter (e.g. an access token)

Makefile.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ HDRS = src/mod_sts.h
1111
# Files to include when making a .tar.gz-file for distribution
1212
DISTFILES=$(SRC) \
1313
$(HDRS) \
14+
test/test.c \
15+
test/stub.c \
16+
sts.conf \
1417
configure \
1518
configure.ac \
1619
Makefile.in \

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
AC_INIT([mod_sts],[0.9.5],[hans.zandbelt@zmartzone.eu])
1+
AC_INIT([mod_sts],[0.9.6],[hans.zandbelt@zmartzone.eu])
22

33
AC_SUBST(NAMEVER, AC_PACKAGE_TARNAME()-AC_PACKAGE_VERSION())
44

src/mod_sts.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,10 @@ int sts_config_check_vhost_config(apr_pool_t *pool, server_rec *s) {
131131
sts_server_config *cfg = ap_get_module_config(s->module_config,
132132
&sts_module);
133133
int rc = OK;
134-
switch (cfg->mode) {
134+
int mode =
135+
(cfg->mode == STS_CONFIG_POS_INT_UNSET) ?
136+
STS_CONFIG_DEFAULT_STS_MODE : cfg->mode;
137+
switch (mode) {
135138
case STS_CONFIG_MODE_WSTRUST:
136139
rc = sts_wstrust_config_check_vhost(pool, s, cfg);
137140
break;
@@ -142,7 +145,7 @@ int sts_config_check_vhost_config(apr_pool_t *pool, server_rec *s) {
142145
rc = sts_otx_config_check_vhost(pool, s, cfg);
143146
break;
144147
default:
145-
sts_serror(s, "STS mode is set to unsupported value: %d", cfg->mode);
148+
sts_serror(s, "STS mode is set to unsupported value: %d", mode);
146149
rc = HTTP_INTERNAL_SERVER_ERROR;
147150
break;
148151

sts.conf

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,11 @@
148148
# (can be relative to the Apache server root directory)
149149
#
150150
#STSROPCEndpointAuth [ client_secret_basic:secret=<secret> |
151-
client_secret_post:secret=<secret> |
152-
client_secret_jwt:secret=<secret>&aud=<aud> |
153-
client_cert:cert=<cert_file>&key=<key_file> ]
151+
# client_secret_post:secret=<secret> |
152+
# client_secret_jwt:secret=<secret>&aud=<aud> |
153+
# private_key_jwt:jwk=<json>[&aud=<aud>] |
154+
# client_cert:cert=<cert_file>&key=<key_file> ]
155+
154156

155157
# (Mandatory)
156158
# Set the Client ID for the OAuth 2.0 ROPC token request.
@@ -202,9 +204,10 @@
202204
# (can be relative to the Apache server root directory)
203205
#
204206
#STSOTXEndpointAuth [ client_secret_basic:secret=<secret> |
205-
client_secret_post:secret=<secret> |
206-
client_secret_jwt:secret=<secret>&aud=<aud> |
207-
client_cert:cert=<cert_file>&key=<key_file> ]
207+
# client_secret_post:secret=<secret> |
208+
# client_secret_jwt:secret=<secret>&aud=<aud> |
209+
# private_key_jwt:jwk=<json>[&aud=<aud>] |
210+
# client_cert:cert=<cert_file>&key=<key_file> ]
208211

209212
# Set the Client ID for the OAuth 2.0 Token Exchange request, used in the client authentication.
210213
# When not defined, the default is to not use any client_id for client authentication.

test/stub.c

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,3 +227,29 @@ AP_DECLARE(void) ap_log_error_(const char *file, int line, int module_index,
227227
AP_DECLARE(char *) ap_server_root_relative(apr_pool_t *p, const char *file) {
228228
return "";
229229
}
230+
231+
AP_DECLARE(int) ap_hook_insert_filter(request_rec *r) {
232+
return 0;
233+
}
234+
235+
AP_DECLARE(apr_status_t) ap_get_brigade(ap_filter_t *filter,
236+
apr_bucket_brigade *bucket,
237+
ap_input_mode_t mode,
238+
apr_read_type_e block,
239+
apr_off_t readbytes) {
240+
return APR_SUCCESS;
241+
}
242+
243+
AP_DECLARE(ap_filter_t *) ap_add_input_filter(const char *name, void *ctx,
244+
request_rec *r, conn_rec *c) {
245+
return 0;
246+
}
247+
248+
249+
AP_DECLARE(ap_filter_rec_t *) ap_register_input_filter(const char *name,
250+
ap_in_filter_func filter_func,
251+
ap_init_filter_func filter_init,
252+
ap_filter_type ftype) {
253+
return 0;
254+
}
255+

test/test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ int main(int argc, char **argv, char **env) {
119119

120120
if (argc < 2) {
121121
printf(" Usage: %s <access_token>\n", argv[0]);
122-
exit(-1);
122+
exit(0);
123123
}
124124

125125
apr_pool_t *pool = NULL;

0 commit comments

Comments
 (0)