Commit Graph

11 Commits (87a9bd43256429302d596738a05193a05b34a47f)

Author SHA1 Message Date
JacobBarthelmeh 87a9bd4325 cleanup some debug messages and start to actual daemon 2022-07-30 00:46:11 -07:00
JacobBarthelmeh 4d90993e16 stub UseDNS, add checking config UsePrivilegeSeparation, scan-build warning fixes 2022-07-29 23:08:19 -07:00
JacobBarthelmeh c978b83c28 add check for PermitRootLogin config 2022-07-29 16:32:39 -07:00
JacobBarthelmeh cd0213572c add parsing Protocol from sshd_config 2022-07-29 16:06:26 -07:00
Hayden Roche ec873e1088 Rename wolfSSHD_NewConfig to wolfSSHD_ConfigNew, following pattern. 2022-07-28 13:34:14 -07:00
Hayden Roche f0caefcc33 Make HandlePort use GetConfigInt and add 0 port test. 2022-07-28 13:21:42 -07:00
Hayden Roche 90769af1f8 Add a test program, test_configuration.c, for testing sshd config.
I wanted to be able to test ParseConfigLine directly, so I added some
preprocessor logic to expose this function (i.e. make it non-static) when
building test_configuration. I fixed a couple bugs discovered by this new
testing.
2022-07-28 13:12:13 -07:00
Hayden Roche cef7e5065a Add support for Port config option and change default port back to 22. 2022-07-27 16:48:10 -07:00
Hayden Roche d62c1e0078 Fix GetConfigInt. 2022-07-27 16:47:14 -07:00
Hayden Roche e255679861 Add support for PasswordAuthentication config option. 2022-07-27 16:46:15 -07:00
Hayden Roche 48b627d70d Refactor various wolfSSHD code.
- Move function declarations for WOLFSSHD_CONFIG from wolfsshd.h to a new
header, configuration.h. Change config.c to configuration.c. (using
"configuration" so as not to collide with autotools' config.h)
- Make the WOLFSSL_CONFIG* member of WOLFSSHD_AUTH const. At least at the
moment, it shouldn't be necessary for this member to be writable.
- Replace wolfSSHD_ConfigGetOption with functions to get specific members from
the config.
- Namespace all config functions with wolfSSHD_Config* and all auth functions
with wolfSSHD_Auth.
- Add const to function parameters, where possible.
- Remove wolfSSHD_ prefix from static functions. Just use PascalCase. These
don't need namespacing since they aren't visible outside their translation unit.
- Modify GetConfigInt to expect leading and trailing whitespace to have already
been removed. It will have been removed in the context this function is used in
configuration.c.
2022-07-27 15:21:11 -07:00