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;
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!");