|
1 | 1 | /* wolfsshd.c |
2 | 2 | * |
3 | | - * Copyright (C) 2014-2021 wolfSSL Inc. |
| 3 | + * Copyright (C) 2014-2022 wolfSSL Inc. |
4 | 4 | * |
5 | 5 | * This file is part of wolfSSH. |
6 | 6 | * |
@@ -143,7 +143,8 @@ static void ShowUsage(void) |
143 | 143 | { |
144 | 144 | printf("wolfsshd %s\n", LIBWOLFSSH_VERSION_STRING); |
145 | 145 | printf(" -? display this help and exit\n"); |
146 | | - printf(" -f <file name> Configuration file to use, default is /etc/ssh/sshd_config\n"); |
| 146 | + printf(" -f <file name> Configuration file to use, default is " |
| 147 | + "/etc/ssh/sshd_config\n"); |
147 | 148 | printf(" -p <int> Port number to listen on\n"); |
148 | 149 | printf(" -d Turn on debug mode\n"); |
149 | 150 | printf(" -D Run in foreground (do not detach)\n"); |
@@ -271,61 +272,7 @@ static int SetupCTX(WOLFSSHD_CONFIG* conf, WOLFSSH_CTX** ctx) |
271 | 272 | } |
272 | 273 | } |
273 | 274 |
|
274 | | - /* Load in host public key */ |
275 | | -// { |
276 | | -// if (userPubKey) { |
277 | | -// byte* userBuf = NULL; |
278 | | -// word32 userBufSz = 0; |
279 | | -// |
280 | | -// /* get the files size */ |
281 | | -// load_file(userPubKey, NULL, &userBufSz); |
282 | | -// |
283 | | -// /* create temp buffer and load in file */ |
284 | | -// if (userBufSz == 0) { |
285 | | -// fprintf(stderr, "Couldn't find size of file %s.\n", userPubKey); |
286 | | -// WEXIT(EXIT_FAILURE); |
287 | | -// } |
288 | | -// |
289 | | -// userBuf = (byte*)WMALLOC(userBufSz, NULL, 0); |
290 | | -// if (userBuf == NULL) { |
291 | | -// fprintf(stderr, "WMALLOC failed\n"); |
292 | | -// WEXIT(EXIT_FAILURE); |
293 | | -// } |
294 | | -// load_file(userPubKey, userBuf, &userBufSz); |
295 | | -// LoadPublicKeyBuffer(userBuf, userBufSz, &pwMapList); |
296 | | -// } |
297 | | -// |
298 | | -// bufSz = (word32)WSTRLEN(samplePasswordBuffer); |
299 | | -// WMEMCPY(keyLoadBuf, samplePasswordBuffer, bufSz); |
300 | | -// keyLoadBuf[bufSz] = 0; |
301 | | -// LoadPasswordBuffer(keyLoadBuf, bufSz, &pwMapList); |
302 | | -// |
303 | | -// if (userEcc) { |
304 | | -// #ifndef WOLFSSH_NO_ECC |
305 | | -// bufName = samplePublicKeyEccBuffer; |
306 | | -// #endif |
307 | | -// } |
308 | | -// else { |
309 | | -// #ifndef WOLFSSH_NO_RSA |
310 | | -// bufName = samplePublicKeyRsaBuffer; |
311 | | -// #endif |
312 | | -// } |
313 | | -// if (bufName != NULL) { |
314 | | -// bufSz = (word32)WSTRLEN(bufName); |
315 | | -// WMEMCPY(keyLoadBuf, bufName, bufSz); |
316 | | -// keyLoadBuf[bufSz] = 0; |
317 | | -// LoadPublicKeyBuffer(keyLoadBuf, bufSz, &pwMapList); |
318 | | -// } |
319 | | -// |
320 | | -// bufSz = (word32)WSTRLEN(sampleNoneBuffer); |
321 | | -// WMEMCPY(keyLoadBuf, sampleNoneBuffer, bufSz); |
322 | | -// keyLoadBuf[bufSz] = 0; |
323 | | -// LoadNoneBuffer(keyLoadBuf, bufSz, &pwMapList); |
324 | | -// |
325 | | -// #ifdef WOLFSSH_SMALL_STACK |
326 | | -// WFREE(keyLoadBuf, NULL, 0); |
327 | | -// #endif |
328 | | -// } |
| 275 | + /* @TODO Load in host public key */ |
329 | 276 |
|
330 | 277 | /* Set allowed connection type, i.e. public key / password */ |
331 | 278 |
|
|
0 commit comments