diff options
author | Simo Sorce <simo@redhat.com> | 2015-04-23 14:51:00 -0400 |
---|---|---|
committer | Simo Sorce <simo@redhat.com> | 2015-04-23 14:51:00 -0400 |
commit | b88a443caf2e96814fa831fa62fe2022bf0c8f08 (patch) | |
tree | 098397f47598a8909a64b10cf1dd28b9e7fe7ec2 /src/mod_auth_gssapi.c | |
parent | 98c182823c31529f70a8931dcdaf4c38db395d87 (diff) | |
download | mod_auth_gssapi-b88a443caf2e96814fa831fa62fe2022bf0c8f08.tar.gz mod_auth_gssapi-b88a443caf2e96814fa831fa62fe2022bf0c8f08.tar.xz mod_auth_gssapi-b88a443caf2e96814fa831fa62fe2022bf0c8f08.zip |
Revert "Use aes-256-gcm rather than aes-128-cbc"
This reverts commit e9c92795d87a316ea47f6bf37c9636e86eec57e7.
AESGCM is a neat idea but it is not really appropriate to be used in
mod_auth_gssapi because we cannot gurantee that the nonce will never be
reused. It is not very probable, and it is also not easy to force the
server to generate so many encyrpted sessions to have a good chance of
a collision that I know of, but better to avoid the whole issue, than
risk unforseen cases where it may happen.
Diffstat (limited to 'src/mod_auth_gssapi.c')
-rw-r--r-- | src/mod_auth_gssapi.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mod_auth_gssapi.c b/src/mod_auth_gssapi.c index 9cb53ec..db33853 100644 --- a/src/mod_auth_gssapi.c +++ b/src/mod_auth_gssapi.c @@ -668,7 +668,7 @@ static const char *mag_use_s4u2p(cmd_parms *parms, void *mconfig, int on) static const char *mag_sess_key(cmd_parms *parms, void *mconfig, const char *w) { struct mag_config *cfg = (struct mag_config *)mconfig; - struct databuf key; + struct databuf keys; unsigned char *val; apr_status_t rc; const char *k; @@ -689,16 +689,16 @@ static const char *mag_sess_key(cmd_parms *parms, void *mconfig, const char *w) return NULL; } - key.length = (int)apr_base64_decode_binary(val, k); - key.value = (unsigned char *)val; + keys.length = (int)apr_base64_decode_binary(val, k); + keys.value = (unsigned char *)val; - if (key.length < 32) { + if (keys.length != 32) { ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, parms->server, - "Invalid key length, expected >=32 got %d", key.length); + "Invalid key lenght, expected 32 got %d", keys.length); return NULL; } - rc = SEAL_KEY_CREATE(cfg->pool, &cfg->mag_skey, &key); + rc = SEAL_KEY_CREATE(cfg->pool, &cfg->mag_skey, &keys); if (rc != OK) { ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, parms->server, "Failed to import sealing key!"); |