Commit graph

1479 commits

Author SHA1 Message Date
bunnie
d23dbd1db8 add an explicit test of the unsub path
normally you would never use this, this would cause the
connection manager to muck up.
2022-04-25 18:30:43 +08:00
bunnie
969b4ec868 refactor net firewall to use .forward() method 2022-04-25 18:30:24 +08:00
bunnie
8d28f130ea fix a missing case for hardware not caught by hosted mode 2022-04-24 21:53:18 +08:00
bunnie
f8246b14f5 run rustfmt on the modals crate 2022-04-24 21:40:42 +08:00
bunnie
547783d195
Merge pull request #150 from nworbnhoj/qrcode
enable notification modal text + qrcode
2022-04-24 21:36:38 +08:00
bunnie
62d56fb70b
Merge pull request #149 from nworbnhoj/index
modal selected index support
2022-04-24 21:27:08 +08:00
nworbnhoj
0e561802ce enable notification modal text + qrcode
change the notification modal to accept the primary message and an
Option of independent text to display as a qrcode

pub fn show_notification(&self, notification: &str, qrtext:Option<&str>) -> Result<(), xous::Error> {}
2022-04-24 21:29:15 +10:00
nworbnhoj
2070236695 minor refinements requested on PR 2022-04-24 20:09:43 +10:00
nworbnhoj
e879ff4b17 modal selected index support
Support for:
- obtaining the index of the selected radiobutton & checkbox
- adding a Vec<&str> of items
2022-04-24 08:28:02 +10:00
bunnie
ce5a81878c fix for issue #145 2022-04-24 00:16:27 +08:00
Sean Cross
f0f1b72e0c log-server: refactor to use stack-allocated buffers
Instead of having a single, shared buffer, simply stack-allocate the log
buffers.

This paves the way in the future to allow for buffers that are
larger-sized and span multiple pages. But most importantly it alleviates
inter-thread locking and contention when passing messages.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-04-23 12:46:20 +08:00
Sean Cross
234c169809 log-server: allow maximum-length buffers to be printed
Previously, we would reject buffers that were the maximum allowed size.
This is reported in #141.

Allow these maximally-sized buffers to be printed, since they don't end
up causing a problem.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-04-23 12:45:27 +08:00
bunnie
987f40f5de minor fixes to multi-modals input
- track field heights using the drawing height directly
- use an &mut reference in the text processing section so changes stick
- other minor cosmetic improvements
2022-04-22 17:44:25 +08:00
bunnie
34c2ffe1a3 fix password entry to work with the new return type
also requires a call to `reset_action_payloads` for the
number of field elements to be recorded correctly!
2022-04-22 17:43:26 +08:00
bunnie
55197e97f4 fix white space 2022-04-22 15:56:11 +08:00
bunnie
4ddd414ed6 fix modals API in the PDDB migration code 2022-04-22 15:55:15 +08:00
bunnie
dd462aebb2 remove trailing/open white spaces 2022-04-22 15:54:43 +08:00
bunnie
2c3143f790 Merge branch 'main' into multi-text-modals 2022-04-22 15:54:18 +08:00
bunnie
bac6c25bfe conversion toward standard testing method 2022-04-22 15:10:51 +08:00
bunnie
012a4d4673
Merge pull request #138 from vmedea/minifb-0.23
Update minifb to 0.23.0
2022-04-20 20:19:09 +02:00
bunnie
ee39b9643e add a timeout for the network to disconnect before starting update
this is to avoid panics due to malformed "packets" being received
as the EC is updating and not working correctly.
2022-04-21 01:22:17 +08:00
Mara Huldra
aa360a9733 Update minifb to 0.23.0
Minifb 0.23 fixes a serious wayland keyboard issue.
2022-04-20 18:28:16 +02:00
bunnie
38d6765586 fix remaining bugs in migration, tested and passing on CI + real hardware 2022-04-20 03:48:05 +08:00
bunnie
b3c89e5f09 add migration of secret basis for v1->v2; fix some interior mutability issues
Probably nobody is really using secret Bases right now, but it's
probably a good idea to lay out all the infrastructure and start
testing it for when it comes time to do it with data that really
matters.
2022-04-19 04:50:15 +08:00
bunnie
2596a35fe0 Merge branch 'main' into bunnie-dev 2022-04-19 02:05:46 +08:00
bunnie
f4f0812fb4 refactor API to use the None encoding for 0 on NonZeroUsize MemoryMessage fields
at the suggestion of @xobs, requires a new libstd to work with this.
2022-04-19 01:32:36 +08:00
bunnie
4ba34bbd58 intermediate work on v1->v2 migration, need to set aside to fix a libstd problem 2022-04-19 00:45:10 +08:00
bunnie
c8a38b4bf5 fix representation of va in pagetable so we're not burning 12 bits on 0's
this is a v2 fix, incompatible with v1
2022-04-19 00:44:45 +08:00
bunnie
7553053f29 v0.0.2.1 initial implementation - still needs migration code
Previous version was v0.0.1.1
New version is v0.0.2.1 (don't ask me why I skipped v0.0.2.0)

The most significant change is that the key derivation for the basis
is now split into two keys. One key is used for the page table ECB
encoding, and a different key is used for the data AES-GCM-SIV encoding.

This is because someone much smarter than me looked at my scheme
and said it is very dangerous to use the same key for two different
types of ciphers. This person is correct, so it had to be rectified.

For the System Basis, the keys are encrypted using the root keys
wrapper API. In this case, we simply create two random keys, one for
the page table, and one for the data region, and wrap them using
the root keys API.

For user secret Basis, the derived keys are sent through HKDF
with two different "info" strings to derive a pair of keys from
a common password.

In case the cryptographer who looked at this is reading along,
note that the basis name is encoded as a fixed-length, 0-padded
record, so, we don't encode the length of the basis in the hash
used to derive the keys. When I explained the scheme I thought
I was using a variable-length basis name to derive the key, but
when I checked the code, it's always 64 bytes long, and bytes
that are not used are 0-padded, so, I think we don't need the
length encoding field.
2022-04-18 15:59:15 +08:00
bunnie
c85f853e08 clean up use statements 2022-04-17 23:03:31 +08:00
bunnie
2fbb522c06 modify the web server to use mpsc, multiple workers
This is basically the Rust example for the web server, with
some tweaks. Add a command to make the device buzz when
a particular URL is hit, and to wait before responding when
another one is hit.
2022-04-17 18:50:10 +08:00
bunnie
89ceba9674 tweak some parameters and debug infos
total threads in the net crate are around 10 right now, 32 max, so
increasing the sleeping thread limit to 16, since every now and then
we get exhaustion notes.
2022-04-17 18:49:27 +08:00
bunnie
ecd875e64f remove the legacy files 2022-04-17 05:00:51 +08:00
bunnie
12190b9184 strip out the legacy xous Tcp stack implementation 2022-04-17 04:59:10 +08:00
bunnie
f2bd4a6193 fix listener address and also remove the forced timeout on read 2022-04-17 04:58:55 +08:00
bunnie
a97b548f94 implement Shutdown for TcpStream 2022-04-17 04:07:54 +08:00
bunnie
b3d83c8494 migrate to std::TcpListener in tests 2022-04-17 04:07:13 +08:00
bunnie
806b09ec0d apply TcpStream fixes
- allow for zero-length tx/rx returns
- implement "shutdown" function, which is different from close:
shutdown requires any pending connections to return Ok(0) immediately,
but the socket is not dropped.
2022-04-17 04:06:05 +08:00
bunnie
9eb35ddd49 Merge remote-tracking branch 'origin/main' into bunnie-dev 2022-04-16 06:28:29 +08:00
bunnie
a555f0380e initial tcplistener draft 2022-04-16 06:26:08 +08:00
Gianguido Sorà
d06c6dcb32 modals: refuse to build modal if no fields have been provided 2022-04-13 16:59:17 +02:00
Gianguido Sorà
0c17bb6e34 modals: get rid of fields_amt value in alert modal builder, can be inferred 2022-04-13 16:57:36 +02:00
Gianguido Sorà
63cbe0e26f shellchat: style change in demo modals command 2022-04-13 15:52:14 +02:00
Gianguido Sorà
c2e619949c status: use new multi-text modals to take time 2022-04-13 15:50:07 +02:00
Gianguido Sorà
8375fdf801 shellchat: update demo modals command to new interface 2022-04-13 15:49:51 +02:00
Gianguido Sorà
89c768625d modals: add builder-based interface to present alerts with text fields inside 2022-04-13 15:49:31 +02:00
Gianguido Sorà
08bbce93f6 modal: add method to return a vec of payloads
content() automatically filters out non-dirty items
2022-04-13 15:48:46 +02:00
Gianguido Sorà
c702025283 gam: add dirty bool to TextEntryPayloads
Useful to filter out unused entries.
2022-04-13 15:47:26 +02:00
bunnie
5d2c65cb6c fix missing update to display in panic handler 2022-04-10 16:57:04 +08:00
bunnie
46624addd0 clean up comments and review panic handler before push 2022-04-10 15:52:57 +08:00