mppe_rekey(state, 1);
if (debug) {
- int i;
- char mkey[sizeof(state->master_key) * 2 + 1];
- char skey[sizeof(state->session_key) * 2 + 1];
-
printk(KERN_DEBUG "%s[%d]: initialized with %d-bit %s mode\n",
debugstr, unit, (state->keylen == 16) ? 128 : 40,
(state->stateful) ? "stateful" : "stateless");
-
- for (i = 0; i < sizeof(state->master_key); i++)
- sprintf(mkey + i * 2, "%02x", state->master_key[i]);
- for (i = 0; i < sizeof(state->session_key); i++)
- sprintf(skey + i * 2, "%02x", state->session_key[i]);
printk(KERN_DEBUG
- "%s[%d]: keys: master: %s initial session: %s\n",
- debugstr, unit, mkey, skey);
+ "%s[%d]: keys: master: %*phN initial session: %*phN\n",
+ debugstr, unit,
+ (int)sizeof(state->master_key), state->master_key,
+ (int)sizeof(state->session_key), state->session_key);
}
/*