Commit Graph

199 Commits (37412ff50fb4903c520c74ad96160b66dca040a0)

Author SHA1 Message Date
Juliusz Sosinowicz 37412ff50f Init zephyr support
- SSH
- SFTP
- SCP
2023-10-02 20:38:21 +02:00
JacobBarthelmeh a650415476
Merge pull request #582 from danielinux/fix_no_term
Fix compile errors when WOLFSSH_TERM is undefined
2023-09-25 09:45:18 -06:00
John Safranek 07e760848f
Read PEM Keys
1. Update wolfSSH_ReadKey_buffer() to decode PEM keys.
2. Add detection of PEM files to wolfSSH_ReadKey_file().
3. Add parameter labels to the prototypes of the ReadKey functions.
2023-09-18 11:46:47 -07:00
Daniele Lacamera 7ff76751f6 Fix compile errors when WOLFSSH_TERM is undefined 2023-09-18 08:23:30 +02:00
John Safranek d4fa4ebd69
Merge branch 'master' into pull-reqs/f4021bb_All_the_filesystem-related_W_macros_accept_a_filesystem_context_pointer_as_first_parameter 2023-09-01 09:08:34 -07:00
JacobBarthelmeh ab742ca766 wolfSSHd port to Windows
handling of terminal size adjustments

stub case for ECH virtual terminal command
2023-08-30 09:08:25 -07:00
Fabio bf223a4d62 Removed unneeded WOLFSSH_API and added null check for the ctx argument. 2023-08-04 07:23:13 +02:00
Fabio Alemagna 092c04fe30 All the filesystem-related W* macros accept a filesystem context pointer as first parameter, to make portability better. 2023-07-21 11:53:40 +02:00
Fabio Alemagna 866dc37601 wolfSSH_CTX_SetSshProtoIdStr 2023-07-21 11:53:16 +02:00
JacobBarthelmeh 3f2aa055ab break between SSH accept and SCP operation 2023-05-19 06:26:18 -07:00
Anthony Hu 9b96f58442 ecc_p256-kyber_level interop with OQS OpenSSH
The implementation now complies with the following draft:
https://www.ietf.org/id/draft-kampanakis-curdle-ssh-pq-ke-01.html

We implement the method as defined by the following name:
ecdh-nistp256-kyber-512r3-sha256-d00@openquantumsafe.org
2023-05-05 15:01:07 -04:00
John Safranek 748f085f12
Rekey
1. Fix an issue found in testing. Some checks for rekeying might happen
   when ssh is NULL.
2023-04-13 16:43:05 -07:00
John Safranek 35554745bc
Update sftpclient
1. Update the example SFTP client with changes made for the echoserver.
2. Better handling of rekeying status.
2023-04-13 16:17:59 -07:00
John Safranek 7e7c5553df
Update wolfSSHd
1. Update wolfSSHd with changes made for the echoserver.
2. Better indication of when the SFTP channel closes.
2023-04-13 11:52:22 -07:00
John Safranek c97e8ea319
Rekey
With the previous change for speed and timing, rekeying started having
trouble in SFTP. Each file block travels as two messages, and the
rekeying starts, but the messages are sent and lost. The client would
terminate the connection.

1. Tweak the timeout in the echoserver's SFTP loop.
2. Better checking for rekeying.
3. Returning that rekeying is happening.
2023-04-11 19:50:55 -07:00
JacobBarthelmeh 5a674a42d7 fix for ssh->error with SCP and public key use with common client code 2023-04-04 21:57:36 -07:00
John Safranek 95bcc4541c
Release v1.4.13
1. Update the copyright year in all file header comments.
2. Update the STM32CUBE files to use the correct GPL headers.
2023-04-03 10:41:10 -07:00
John Safranek d8c6fe8c8a
Add macro for giving a name to hushing unused variable handling. 2023-02-10 13:41:01 -08:00
John Safranek 6d6b4686b2
Fix SFTP Upload Stall
1. Update README for the change in the default channel receive window size.
2. In the SFTP client, add rekeying as a error that's OK to ignore.
3. In wolfSSH_stream_read(), clear the SSH object's error register.
2023-02-01 17:09:30 -08:00
John Safranek c1569ed31c
Fix SFTP Upload Stall
1. Remove the function wolfSSH_stream_adjust_window() and use
    _UpdateChannelWindow() in wolfSSH_stream_read().
2. Whitespace.
3. In _UpdateChannelWindow(), add the clause of the channel windowSz
    being 0 as a trigger.
4. In _UpdateChannelWindow(), remove redundant code.
5. Channel window can be update during rekey.
2023-01-31 17:03:46 -08:00
JacobBarthelmeh 3e64f13b36 fix for x509 connections 2022-12-19 16:37:40 -07:00
John Safranek 2cbbdfb798
Fixing name conflicts with the RTOS Integrity
1. Rename the type struct Buffer as struct WOLFSSH_BUFFER.
2. Rename the function Receive() as ReceiveData().
3. Fix unused variable value.
4. Rename the I/O callback functions LastError() as wsErrno() and
   TranslateReturnCode() as wsReturnCode(). LastError was conflicting
   with something, and TRC was just long.
5. The logFunction callback pointer isn't used in non-debug builds, and
   the compiler reported as such. Reference the variable to hush the
   warning.
2022-10-20 14:53:01 -07:00
John Safranek 19eaf98ae9
Multiple Server Keys
1. Fixing comments from review.
2. Use IdentifyKey in the function wolfSSH_ReadKey_buffer.
3. Modify BuildNameList to make a proper string and possibly return an
   error code.
2022-10-18 09:07:21 -07:00
John Safranek fe2d68619c
SFTP List
More Updates from peer review comments.
2022-09-23 16:25:51 -07:00
John Safranek a48926b0dd
SFTP List
1. Update wolfSSH_SFTPNAME_readdir() to have a special case getting
   the drive letters at root in Windows.
2. The Win32 APIs can use forward slashes, but cannot have one at the
   beginning of the path before the drive letter. Add a trim function
   to remove the leading slash in the SFTP paths.
3. Update echoserver to always set the default SFTP path to either the
   provided command line option or to the CWD for the echoserver run.
4.  Get the RealPath for the default path
5. Tweak wolfSSH_RealPath() to handle some Windows cases.
6. Added more test cases.
2022-09-16 14:17:31 -07:00
John Safranek 3aaa0d4689
SFTP List
1. Add some more test cases to the RealPath() test.
2. Change the API for the function wolfSSH_RealPath(). It doesn't need
   the currentPath. Non-absolute paths are relative to defaultPath.
3. If defaultPath isn't present, use "/".
2022-09-16 14:11:40 -07:00
JacobBarthelmeh 3e1a6ff342 add mutual X509 auth of host key and sshd_config parsing additions 2022-09-06 16:15:34 -07:00
JacobBarthelmeh e40e852bc2 handle certificate chains 2022-08-24 06:35:40 -07:00
John Safranek 2385e0d266 User Authentication Result Callback
1. Add a callback function for public key user authenticaiton after
   checking the signature. Calls in success and failure cases.
2022-08-24 06:35:40 -07:00
John Safranek a8fa38d7f8 OCSP Lookups
1. Changed to use the new set of certs.
2. Do an actual cert check and report errors.
3. Do an actual OCSP lookup and report errors.
2022-08-24 06:35:40 -07:00
John Safranek 1405eeae62 X.509 Certificate Support
1. Fix build error when building without certificates.
2. Add the root CA option to the echoserver usage.
3. Update the readme file to include the new certificate option.
4. Added command line option to load a CA cert into the echoserver.
2022-08-24 06:35:40 -07:00
JacobBarthelmeh 1f280647c8 include header for FIPS callback function 2022-08-22 17:29:13 -06:00
John Safranek 185a730752
SFTP RealPath
1. Add a function for returning a RealPath per the SFTP RFC.
2. Add a test function for the RealPath to test against.
2022-08-21 21:32:25 -07:00
Jacob Barthelmeh 92d1f39065 update copyright date 2022-08-17 16:58:21 -06:00
JacobBarthelmeh dba42d3dc7 Non-blocking SFTP and SSH fixes, handle edge case with files having '.' in name, alter want write case to return consumed size 2022-08-08 13:43:34 -07:00
JacobBarthelmeh 3475e99f96 reset want read/write state on calling wolfSSH_accept and do not allow calling in error state 2022-07-13 21:41:52 -07:00
David Garske 76ba904819 Fixes for all FIPS 140-3 cases. 2022-04-04 16:27:23 -07:00
David Garske 0f22329187 Fix for FIPS 140-3 on ECC private key use. Fix for IPv6 with scpclient. Wrong macro for fall through. Add support for flushing file IO using `WOLFSCP_FLUSH`. 2022-03-24 13:34:26 -07:00
Takashi Kojo a8dee72390 macro guarde for WOLFSSH_NO_DH_GEX_SHA256 2021-12-15 10:25:36 +09:00
John Safranek 49bd5d6988
Add window updates to Channel reads and ChannelId reads. 2021-11-09 10:15:45 -08:00
Jacob Barthelmeh ba99ddda68 run license update script 2021-11-04 13:11:53 -06:00
Jacob Barthelmeh d3c80b8fe8 g++ build warning fixes 2021-11-04 00:59:21 -06:00
John Safranek dd79a54541
Fix issue with shutting down a channel. It would try to do it twice and error out. 2021-10-05 19:38:18 -07:00
John Safranek f369f4346c
Static Analysis Test Report Fixes
1. Moved SendKexDhReply()'s signature data to the heap. (413)
2. Moved SendUserAuthRequest()'s signature data to the heap. (414)
3. Moved DoKexDhReply()'s signature data to the heap. (415)
4. Moved DoUserAuthRequestRsa()'s RSA key to the heap. (416)
5. Moved wolfSSH_ProcessBuffer()'s key buffer to the heap. (422)
6. Moved wolfSSH_ReadKey_buffer()'s key bugger to the heap. (423)
7. In the echoserver, fixed a small-stack related allocation. It was
   using a DYNTYPE constant, but those aren't visible. Also, the
   wrong variable name was getting freed. (rebase)
2021-09-27 08:35:15 -07:00
John Safranek 6d606dff45
Port Forwarding Update
1. Fix issue with local port forwarding example.
2. Add remote port forwarding to the echoserver.
3. Updated the unsupported GlobalReq response.
2021-09-27 08:06:54 -07:00
Jacob Barthelmeh 7968cb479e make loading user created keys into the examples easier 2021-08-25 09:53:58 -06:00
Jacob Barthelmeh 094eff8933 reduce stack size of wolfSSH_ReadKey_buffer with smallstack 2021-08-03 20:39:19 +07:00
Takashi Kojo 329e45f03c WOLFSSH_USER_FILESYSTEM, fix WOLFSSL_USER_IO conflict 2021-04-23 12:21:56 +09:00
JacobBarthelmeh a77bc90b75
Merge pull request #324 from danielinux/nosyscall-fixes
SCP: improvements to run on embedded RTOS
2021-03-26 16:37:13 +07:00
Jacob Barthelmeh 4828cef216 fix for handling rekey 2021-02-19 01:27:24 +07:00