when a host is added, we must make sure the app also provides a key *type* even
though we don't use the type in this function
This commit is contained in:
parent
2e990194ab
commit
1d31dadc1e
@ -111,6 +111,10 @@ libssh2_knownhost_add(LIBSSH2_KNOWNHOSTS *hosts,
|
|||||||
if(!entry)
|
if(!entry)
|
||||||
return rc;
|
return rc;
|
||||||
|
|
||||||
|
if(!(typemask & LIBSSH2_KNOWNHOST_KEY_MASK))
|
||||||
|
/* make sure we have a key type set */
|
||||||
|
return LIBSSH2_ERROR_INVAL;
|
||||||
|
|
||||||
memset(entry, 0, sizeof(struct known_host));
|
memset(entry, 0, sizeof(struct known_host));
|
||||||
|
|
||||||
entry->typemask = typemask;
|
entry->typemask = typemask;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user