Commit b3cab3ce authored by Matt Johnston's avatar Matt Johnston
Browse files

Log when generating a hostkey

parent e5279b0e
......@@ -29,7 +29,7 @@ This file is generated with
or automatically with the '-R' option. See "Host Key Files" below.
.B \-R
Generate hostkeys automatically
Generate hostkeys automatically. See "Host Key Files" below.
.B \-F
Don't fork into background.
......@@ -145,6 +145,20 @@ static void svr_ensure_hostkey() {
ret = readhostkey(fn, svr_opts.hostkey, &type);
if (ret == DROPBEAR_SUCCESS) {
char *fp = NULL;
unsigned int len;
buffer *key_buf = buf_new(MAX_PUBKEY_SIZE);
buf_put_pub_key(key_buf, svr_opts.hostkey, type);
buf_setpos(key_buf, 4);
len = key_buf->len - key_buf->pos;
fp = sign_key_fingerprint(buf_getptr(key_buf, len), len);
dropbear_log(LOG_INFO, "Generated hostkey %s, fingerprint is %s",
fn, fp);
if (fn_temp) {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment