Commit Graph

2171 Commits (master)

Author SHA1 Message Date
John Safranek fbadac84cb Reduce SCP Allocations
1. Create the SCP file and recv msg buffer once, and just keep it.
2. Whitespace.
2024-07-02 13:28:20 -07:00
Eric Blankenhorn 0719578e29 Fix testsuite with singlethreaded 2024-07-01 09:12:36 -05:00
JacobBarthelmeh 816b314819 case of non-console ouptut handle 2024-06-24 13:52:17 -06:00
JacobBarthelmeh 4dabe1cb94
Merge pull request #714 from ejohnstown/fix-warnings
Fix Initialization Warnings
2024-06-21 13:13:58 -06:00
John Safranek 3c46fae985 Fix Initialization Warnings
1. For a Zephyr build setup, the compiler was complaining about some
   uninitialized variables that were getting used. Set them to 0 or NULL
   to make the compiler happy.
2024-06-21 11:05:32 -07:00
John Safranek 015ae8483b Channel Callbacks (Request Rejection)
1. Treat any non-zero response from any of the channel request callback
   functions as a rejection of the channel request.
2. If a channel request reply is wanted, return the failure message if
   the callback function had rejected the request.
2024-06-21 08:27:41 -07:00
John Safranek 57f14518e7 Channel Callbacks (Rearrange Checks)
1. In DoChannelRequest(), rearrange the test cases. Start with the
   requests that are always expected as possible, and make the optional
   ones follow.
2024-06-21 08:27:41 -07:00
John Safranek b89c938000 Channel Callbacks (Request Exec)
1. Add a callback hook for channel requests of the exec type.
2024-06-21 08:27:41 -07:00
John Safranek 5d40f8af62 Channel Callbacks (Get Session Type and Command)
1. Move the session types earlier in the ssh.h header.
2. Add functions wolfSSH_ChannelGetSessionType() and
   wolfSSH_ChannelGetSessionCommand() to requestion information about a
   session.
2024-06-21 08:27:41 -07:00
John Safranek e1a5ffd231 Channel Callbacks (EOF and Close)
1. Add checks for the Channel EOF or Close callbacks to the Do functions
   for those messages, and call them.
2024-06-21 08:27:41 -07:00
John Safranek 06b70db8f4 Channel Callbacks (Request Shell)
1. Add callback for the "shell" Channel Request message for the server.
2. Whitespace and braces changes.
3. Relabel the string for administratively prohibited channel opens.
4. Add some comment.
2024-06-21 08:27:41 -07:00
John Safranek 45d5e916e4 Channel Callbacks (EOF and Close)
1. Added callbacks for receiving a Channel EOF message and a Channel
   Close message.
2. Added accessors for the new callback's ctx parameters.
3. Add some missing comments on the channel open callbacks.
2024-06-21 08:27:41 -07:00
John Safranek bb0809ceca Channel Callbacks (Open Conf and Open Fail)
1. Add channel open callback APIs to support two client callback
   functions, Channel Open Conf and Fail.
2024-06-21 08:27:41 -07:00
John Safranek 91a545fa15 Channel Callbacks (Open)
1. Add the new Channel Open callback support APIs.
2024-06-21 08:27:41 -07:00
JacobBarthelmeh 523c8908d1
Merge pull request #712 from ejohnstown/echo-refresh
Echoserver Refresh
2024-06-21 09:25:51 -06:00
JacobBarthelmeh 93853aead0
Merge pull request #711 from ejohnstown/sftp-symlink
SFTP Symlink
2024-06-21 09:25:39 -06:00
John Safranek 63a3068dc7 Configure Updates
1. Update the configure.ac for an incorrect PTERM flag.
2024-06-20 16:35:54 -07:00
John Safranek c1e5af49dc Echoserver Refresh
1. Add the code from wolfsshd that initially sets up the terminal
   settings to the echoserver.
2. Add the WOLFSSH_TERM flag to the build of the echoserver.
2024-06-20 15:38:37 -07:00
John Safranek 9bfca14ac6 SFTP Symlink
1. When the server tries to open a file, get the attributes following
   links.
2. Add decoding links from the file attributes when making a long name.
3. When the server gets a file attributes for the file list, do not
   follow links.
4. When the client tries to stat a file before getting it, it should use
   the stat that follows links.
2024-06-18 14:56:16 -07:00
John Safranek e2aadb1c51
Merge pull request #707 from kojo1/sftp-stat
connection check on wolfSSH_SFTP_STAT
2024-06-17 17:17:09 -07:00
John Safranek 9ad1d1cb0c
Merge pull request #710 from JacobBarthelmeh/scp_example
add check for channel closed error
2024-06-17 15:56:29 -07:00
JacobBarthelmeh 0a0bf3f815 return WS_CHANNEL_CLOSED from wolfSSH_shutdown instead of WS_SUCCESS 2024-06-14 16:11:02 -06:00
JacobBarthelmeh 23a9333b2d add check for channel closed error 2024-06-10 15:54:42 -06:00
John Safranek 524b5c6052
Merge pull request #702 from JacobBarthelmeh/scp_example
adjust scp error return checking for closed channels
2024-06-05 15:30:15 -07:00
John Safranek 3024d28270
Merge pull request #695 from JacobBarthelmeh/541
Server side auth pending support
2024-06-05 15:27:36 -07:00
David Garske 2e0f509e81
Merge pull request #709 from ejohnstown/rsa-verify-refactor
RSA Verify Refactor
2024-06-05 15:04:03 -07:00
John Safranek 12b0a43a66 RSA Verify Refactor
1. If the signature to verify is short, pad it to the key length with
   leading zeros. Some implementations of SSH will prune leading zeros
   from an mpint value as a string for the signature.
2. Change some of the GetSize() and play with pointers to using
   GetStringRef() or GetMpint().
3. Added an RSA private key for testing with PuTTY client.
2024-06-05 14:36:04 -07:00
David Garske b6ccb07de4
Merge pull request #703 from anhu/ipv6_part2
improvements for ipv6
2024-06-03 16:22:16 -07:00
David Garske c330222975
Merge pull request #708 from ejohnstown/sign-h-rsa
Sign H Casting
2024-06-03 12:05:25 -07:00
David Garske 79ef513386
Merge pull request #705 from ejohnstown/rsa-raw
Using Decode Raw RSA Private Key
2024-06-03 12:05:16 -07:00
Anthony Hu ec4909b21c WOLFSSH_UNUSED 2024-06-03 14:56:51 -04:00
Anthony Hu 1697d603c0 Changes inspired by ejohnstown comments. 2024-06-03 14:40:52 -04:00
John Safranek 4281ee4b4e Sign H Casting
1. Fix the typecasting when signing H with RSA.
2. Assign the sign return value to ret, then assign it to *sigSz if
   successful.
3. Similar change for the encoded sign value.
2024-06-03 11:30:42 -07:00
John Safranek a021c42074 Using Decode Raw RSA Private Key
1. If wc_RsaPrivateKeyDecodeRaw() is available, use it to load the
   private key from GetOpenSshKeyRsa(). If unavailable, process the key
   the original way.
2. Check for wolfSSL version and if greater than v5.7.0, the new
   function is available.
3. When loading an OpenSSH format RSA key, if wolfSSL's RSA_LOW_MEM is
   set, skip the u value, and do not calculate dP and dQ.
4. Rename RsaCalcInverses() to RsaCalcDX().
2024-06-03 10:46:04 -07:00
Takashi Kojo 4ab1d21e66 connection check on wolfSSH_SFTP_STAT 2024-06-03 09:09:39 +09:00
John Safranek 0e72885161
Merge pull request #704 from wolfSSL/scp-example
scpclient.c: correct call to wolfSSH_SetPublicKeyCheckCtx
2024-05-31 21:19:25 -07:00
Anthony Hu 499a742097 improvements for ipv6 2024-05-31 17:32:20 -04:00
Juliusz Sosinowicz 6de1230e6b scpclient.c: correct call to wolfSSH_SetPublicKeyCheckCtx 2024-05-31 17:06:34 +02:00
JacobBarthelmeh d09e00a22f
Merge pull request #698 from miyazakh/sha1_softdisable
Enable sha1 when WOLFSSH_NO_SHA1_SOFT_DISABLE is enabled
2024-05-30 11:42:52 -06:00
David Garske 914f984264
Merge pull request #700 from JacobBarthelmeh/scp
error out when trying to send non existent local files
2024-05-29 13:40:28 -07:00
JacobBarthelmeh c3aaa6e570 adjust scp error return checking for closed channels 2024-05-29 13:44:58 -06:00
David Garske 11f0b22a0d
Merge pull request #701 from anhu/ipv6_fix
Fix compile error triggered by enabling TEST_IPV6
2024-05-28 09:43:21 -07:00
Anthony Hu 17a9ff4caa Fix compile error triggered by enabling TEST_IPV6 2024-05-27 17:09:00 -04:00
JacobBarthelmeh e483578904
Merge pull request #699 from gojimmypi/PR-Espressif-Example-Update
Update Espressif examples for Managed Component publish
2024-05-23 17:25:25 -06:00
JacobBarthelmeh 7d6fbcf770 add test case 2024-05-23 13:57:23 -06:00
JacobBarthelmeh 0e11a143fd error out if unable to open the local file when doing a SCP send 2024-05-23 13:49:48 -06:00
gojimmypi 45a857b960 Update Espressif examples for Managed Component publish 2024-05-22 16:10:44 -07:00
Hideki Miyazaki 3c8939c55d sha1 is only enabled when user intentionally enables NO_SHA1_SOFT_DISABLE 2024-05-22 11:19:19 +09:00
David Garske 702e0ee890
Merge pull request #696 from ejohnstown/update-test
OS Check Test
2024-05-20 09:01:37 -07:00
John Safranek c004c15232 Update Test
1. Change kyber test to use the cache naming in the other test.
2. Remove moving wolfSSL to another directory. Clears a bunch of
   warnings.
3. Build liboqs to install in the same directory as wolfSSL.
2024-05-17 16:32:50 -07:00