summaryrefslogtreecommitdiffhomepage
path: root/svr-runopts.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2017-05-13 22:50:54 +0800
committerMatt Johnston <matt@ucc.asn.au>2017-05-13 22:50:54 +0800
commitfb719e3d0ba3571d3abc5638d1fbbe9e1675d6a7 (patch)
tree7a72eeedf1e3c89258e1e35057f737f1d0176f9c /svr-runopts.c
parent9f24cdf74c93aa75416687972e69b5b4c8be2698 (diff)
fuzz harness
--HG-- branch : fuzz
Diffstat (limited to 'svr-runopts.c')
-rw-r--r--svr-runopts.c58
1 files changed, 0 insertions, 58 deletions
diff --git a/svr-runopts.c b/svr-runopts.c
index c0b7bf2..295b653 100644
--- a/svr-runopts.c
+++ b/svr-runopts.c
@@ -346,19 +346,6 @@ void svr_getopts(int argc, char ** argv) {
}
opts.idle_timeout_secs = val;
}
-
-#ifdef DROPBEAR_FUZZ
- if (opts.fuzz.fuzzing) {
- struct passwd *pw;
- /* user lookups might be slow, cache it */
- pw = getpwuid(getuid());
- dropbear_assert(pw);
- opts.fuzz.pw_name = m_strdup(pw->pw_name);
- opts.fuzz.pw_dir = m_strdup(pw->pw_dir);
- opts.fuzz.pw_shell = m_strdup(pw->pw_shell);
- opts.fuzz.pw_passwd = m_strdup("!!zzznope");
- }
-#endif
}
static void addportandaddress(const char* spec) {
@@ -488,57 +475,12 @@ static void addhostkey(const char *keyfile) {
svr_opts.num_hostkey_files++;
}
-#ifdef DROPBEAR_FUZZ
-static void load_fixed_hostkeys() {
-#include "hostkeys.c"
-
- buffer *b = buf_new(3000);
- enum signkey_type type;
-
- TRACE(("load fixed hostkeys"))
-
- svr_opts.hostkey = new_sign_key();
-
- buf_setlen(b, 0);
- buf_putbytes(b, keyr, keyr_len);
- buf_setpos(b, 0);
- type = DROPBEAR_SIGNKEY_RSA;
- if (buf_get_priv_key(b, svr_opts.hostkey, &type) == DROPBEAR_FAILURE) {
- dropbear_exit("failed fixed rsa hostkey");
- }
-
- buf_setlen(b, 0);
- buf_putbytes(b, keyd, keyd_len);
- buf_setpos(b, 0);
- type = DROPBEAR_SIGNKEY_DSS;
- if (buf_get_priv_key(b, svr_opts.hostkey, &type) == DROPBEAR_FAILURE) {
- dropbear_exit("failed fixed dss hostkey");
- }
-
- buf_setlen(b, 0);
- buf_putbytes(b, keye, keye_len);
- buf_setpos(b, 0);
- type = DROPBEAR_SIGNKEY_ECDSA_NISTP256;
- if (buf_get_priv_key(b, svr_opts.hostkey, &type) == DROPBEAR_FAILURE) {
- dropbear_exit("failed fixed ecdsa hostkey");
- }
-
- buf_free(b);
-}
-#endif // DROPBEAR_FUZZ
void load_all_hostkeys() {
int i;
int disable_unset_keys = 1;
int any_keys = 0;
-#ifdef DROPBEAR_FUZZ
- if (opts.fuzz.fuzzing) {
- load_fixed_hostkeys();
- return;
- }
-#endif
-
svr_opts.hostkey = new_sign_key();
for (i = 0; i < svr_opts.num_hostkey_files; i++) {