Commit graph

9123 commits

Author SHA1 Message Date
Linus Groh
ce0bed0482 js: Ignore property attributes for completion
Only being able to complete enumerable properties is annoying,
especially since we updated everything to use the correct attributes.

Most standard built-in objects are *not* enumerable.
2020-05-02 19:21:50 +02:00
Sergey Bugaev
628777f94a LibIPC: Abort on connection failure
...instead of looping for (effectively) ever.

Fixes https://github.com/SerenityOS/serenity/issues/1869
2020-05-02 15:59:37 +02:00
Sergey Bugaev
d5582596a9 SystemServer: Bump the default listening socket backlog to 16
We now have many clients that are trying to connect to the WindowServer
simultaneously on startup. We could make this configurable, but 16 should
be enough for anybody ™.
2020-05-02 15:59:37 +02:00
Andres Vieira
ad309d4eca Terminal: Write an empty string instead of (null) on Command key
This prevents a Terminal to create a configuration file with
 Command=(null)

That would make it try to execute the command "(null)" on the next run.
2020-05-02 15:41:27 +02:00
Shannon Booth
0e403a43a4 Terminal: Add config for startup command
This is useful when working on a program as you can put the command into
the config file, instead of having to type it up each time on boot.
2020-05-02 14:12:57 +02:00
Brendan Coles
548ecceb75 Screensaver: Add app-screensaver.png 16x16 icon 2020-05-02 14:12:45 +02:00
Ben Wiederhake
cfbc49b5fc LibGUI: FilePicker: Set initial sort to name instead of undefined
Well, technically the initial sort order is 'ascending inode'.
However, that is unpredictable for the user.
In the rare case it is desired, it can be re-enabled by revealing the
inode column, and then sorting by it, in the TableView.
2020-05-02 14:12:36 +02:00
Ben Wiederhake
b6bea3d25b LibGUI: Fix off-by-one in ScrollableWidget
This was most notable in the widgets TextBox and TextEditor (and
therefore also ComboBox and ColorInput), because there the cursor
regularly landed just one pixel outside the visible region when
going to the right.
2020-05-02 14:12:36 +02:00
Ben Wiederhake
5d3ac4ec9e DisplaySettings: Don't crash after 'pape'
Running 'pape' without arguments (or just editing the WindowServer.ini by hand)
can confuse DisplaySettings. Specifically, if the 'Wallpaper' is set to
'/res/wallpapers/', then DisplaySettings used to crash because 'name_parts'
wouldn't contain any trailing element.

It's hard to define desired behavior, but this is better than crashing
and confusing the user.
2020-05-02 14:12:36 +02:00
Ben Wiederhake
1b140d1b5b LibGUI: FilePicker: Make icon view button initially checked 2020-05-02 14:12:36 +02:00
Ben Wiederhake
ef433cb367 LibGUI: The UI calls it 'Icon view', fix the name in the code 2020-05-02 14:12:36 +02:00
Ben Wiederhake
8e01356b2f LibGUI: FilePicker: Populate location textbox 2020-05-02 14:12:36 +02:00
Ben Wiederhake
6a453370ad LibGUI: FilePicker: Fix position of location textbox 2020-05-02 14:12:36 +02:00
Ben Wiederhake
ebabce30bd LibGUI: Display hidden columns as hidden
Until now, hidden columns were displayed as visible in the context menu.
An easy way to reproduce this is:
- Open the TextEditor
- Ctrl-O to open the file selector
- Switch to table view
- Right-click the header

Expected behavior:
Hidden columns like 'Owner' and 'Group' should not have a checkmark,
because they are hidden.

Actual behavior: They did have a checkmark. Clicking on it to 'hide'
the already hidden column removed the checkmark, but was a no-op to the
table view.

This commit fixes this behavior, by correctly initializing the context menu,
and properly updating the context menu if external code calls
'set_column_hidden' later.
2020-05-02 14:12:36 +02:00
Ben Wiederhake
55ff392835 LibGUI: Remove unneeded access rights 2020-05-02 14:12:36 +02:00
Ed Rochenski
ca1d11b180 Ports: Added rsync port 2020-05-02 14:12:07 +02:00
Ed Rochenski
861eb8d295 LibC: added F_SETLK and SO_TYPE defs 2020-05-02 14:12:07 +02:00
Andreas Kling
3331098aee WindowServer+LibGUI+Taskbar: Don't include frameless windows in lists
Frameless windows don't need to show up in the taskbar or the switcher.
2020-05-02 12:24:23 +02:00
AnotherTest
c9321b4f00 LibCrypto: Make UnsignedBigInteger as fast as architecturally possible
This commit attempts to make UnsignedBigInteger as fast as possible
without changing the underlaying architecture.
This effort involves
- Preallocating space for vector operations
- Avoiding calls to computationally expensive functions
- Inlining or flattening functions (sensibly)
2020-05-02 12:24:10 +02:00
AnotherTest
4d932ce701 LibCrypto: Tweak ::prune_padding() to be more intuitive with loop bounds 2020-05-02 12:24:10 +02:00
AnotherTest
b394543d3c Userland: Tweak the tests in test-crypto
- Clarify the purpose of "AES | Specialised Encrypt"
- Decouple the TLS test from the host machine
- Add a "test" mode to run all available tests
2020-05-02 12:24:10 +02:00
AnotherTest
0da07c284e LibTLS: Implement build_alert() 2020-05-02 12:24:10 +02:00
AnotherTest
adab43987d LibCrypto: Rename UnsignedBigInteger APIs to match their actions 2020-05-02 12:24:10 +02:00
AnotherTest
e366416d51 LibCrypto: Preallocate capacity and cache trimmed_length() in UnsignedBigInteger 2020-05-02 12:24:10 +02:00
AnotherTest
d0106c129a AK: Inline busy functions in Vector 2020-05-02 12:24:10 +02:00
AnotherTest
dace14e70d LibTLS: Split TLSv12 to sensible categorical files
This commit splits the TLSv12 file into multiple files, and also removes
some magic values, to make the code less horrible. :^)
2020-05-02 12:24:10 +02:00
AnotherTest
75310003e5 Userland test-crypto: Add interactive mode for the tls 'mode'
For all your raw TLS testing needs :^)
2020-05-02 12:24:10 +02:00
AnotherTest
bb46e5f608 LibTLS: Switch to Hash::Manager for hashing and add SHA1
Now we can talk to google.com
2020-05-02 12:24:10 +02:00
AnotherTest
43a49f5fff LibCrypto: Add a Hash::Manager that can act as any one of the hashes 2020-05-02 12:24:10 +02:00
AnotherTest
e997661e26 LibCrypto: Implement SHA1 Hash Function 2020-05-02 12:24:10 +02:00
AnotherTest
e015ffd5f0 LibCrypto: Ensure that EME padding does not contain zeros
With this fix, we can now reliably open TLS connections!
2020-05-02 12:24:10 +02:00
AnotherTest
05e2c7d9cf LibCrypto+LibTLS: Reformat everything
I have no idea how I'll squash _this_ one...
2020-05-02 12:24:10 +02:00
AnotherTest
a1e1570552 LibCrypto+LibTLS: Generalise the use of IV length
This is in preparation for the upcoming Galois/Counter mode, which
conventionally has 12 bytes of IV as opposed to CBC's 16 bytes.

...Also fixes a lot of style issues, since the author finally found the
project's clang config file in the repository root :^)
2020-05-02 12:24:10 +02:00
AnotherTest
7384d58a0a Userland: Adapt test-crypto to the new AK::Result API 2020-05-02 12:24:10 +02:00
AnotherTest
72d56b46b5 LibTLS: Make enough stuff work to have a demo run
...maybe, sometimes :^)
2020-05-02 12:24:10 +02:00
AnotherTest
7670e5ccf0 LibCore+LibHTTP: Move out the HTTP handler and add HTTPS 2020-05-02 12:24:10 +02:00
AnotherTest
8d20a526e5 LibCrypto: Preallocate 128 words of space for UnsignedBigInteger
This shaves off 1 second of runtime
2020-05-02 12:24:10 +02:00
AnotherTest
2247036acf LibTLS: Implement a preliminary version of the TLS protocol
TLS::TLSv12 is a Core::Socket, however, I think splitting that into a
TLS::Socket would probably be beneficial
2020-05-02 12:24:10 +02:00
AnotherTest
7eb72c72e8 LibCore: Mark Socket::{common_,}connect() virtual and add a on_write 2020-05-02 12:24:10 +02:00
AnotherTest
f1578d7e9e LibCrypto: Fix issues in the Crypto stack
This commit fixes up the following:
- HMAC should not reuse a single hasher when successively updating
- AES Key should not assume its user key is valid signed char*
- Mode should have a virtual destructor
And adds a RFC5246 padding mode, which is required for TLS
2020-05-02 12:24:10 +02:00
AnotherTest
7adb93ede9 LibCrypto: Implement RSA in terms of UnsignedBigInteger
This commit also adds enough ASN.1/DER to parse RSA keys
2020-05-02 12:24:10 +02:00
AnotherTest
6b742c69bd LibCrypto: Add ::import_data() and ::export_data() to UnsignedBigInteger
These functions allow conversion to-and-from big-endian buffers
This commit also adds a ""_bigint operator for easy bigint use
2020-05-02 12:24:10 +02:00
Itamar
c52d3e65b9 LibCrypto: Cleanup UnsignedBigInteger a bit
- Add missing 'explicit' to the constructor
- Remove unneeded 'AK::' in AK::Vector
- Avoid copying 'words' in constructor
2020-05-02 12:24:10 +02:00
Itamar
2125a4debb LibCrypto: Add base-10 string de/serialization methods for bigint 2020-05-02 12:24:10 +02:00
Itamar
709c691f38 LibCrypto: Fix bug in big int subtraction
A regression test was added to the suite.

This commit also generally simplifies the subtraction method.
2020-05-02 12:24:10 +02:00
Itamar
0d2777752e LibCrypto: Add UnsignedBigInteger division
The division operation returns both the quotient and the remainder.
2020-05-02 12:24:10 +02:00
Itamar
2959c4a5e9 LibCrypto: Add UnsignedBigInteger multiplication
Also added documentation for the runtime complexity of some operations.
2020-05-02 12:24:10 +02:00
Itamar
2843dce498 LibCrypto: Fix a bug in big int addition
There was a bug when dealing with a carry when the addition
result for the current word was UINT32_MAX.

This commit also adds a regression test for the bug.
2020-05-02 12:24:10 +02:00
Itamar
e0cf40518c LibCrypto: Add UnsignedBigInteger subtraction and comparison 2020-05-02 12:24:10 +02:00
Itamar
6201f741d4 LibCrypto: Add UnsignedBigInteger and implement addition
UnsignedBigInteger stores an unsigned ainteger of arbitrary length.

A big integer is represented  as a vector of word. Each
word is an unsigned int.
2020-05-02 12:24:10 +02:00