Linus Groh
d007e8d00f
LibJS: Set correct "length" of Object constructor
2020-05-02 20:41:31 +02:00
Linus Groh
85582953c6
LibJS: Minor formatting changes in Function.cpp
2020-05-02 20:41:31 +02:00
Linus Groh
ae05dc8abc
LibJS: Name functions created by "Function" "anonymous"
...
...as it is supposed to be.
2020-05-02 20:41:31 +02:00
Emilio Cobos Álvarez
e347d6bdb8
LibGUI: Properly remove auto-destroyed child windows from reified_windows.
...
I just spotted this while I saw you writing this code :-)
2020-05-02 20:27:07 +02:00
AnotherTest
a63e8c4a03
LibHTTP: Trim received data to Content-Length
...
Apparently servers will feel free to pad their response if they send one
that contains a content-length field.
We should not assume that the entirety of the response is valid data.
2020-05-02 20:23:15 +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
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
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
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
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
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
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
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
AnotherTest
8c645916b4
LibCrypto: Add SHA512
...
There is quite a bit of avoidable duplication, however, I could not get
the compiler to be happy about SHA2<Size> (see FIXMEs)
2020-05-02 12:24:10 +02:00
AnotherTest
ca097b093b
LibCrypto: Add SHA256 hash function
2020-05-02 12:24:10 +02:00
AnotherTest
f2cd004d11
LibCrypto: Implement HMAC
2020-05-02 12:24:10 +02:00
AnotherTest
4f89a377a4
LibCrypto: Move each subsection into its own namespace
2020-05-02 12:24:10 +02:00
AnotherTest
bffb2c7542
LibCrypto: Add HashFunction and implement MD5
2020-05-02 12:24:10 +02:00
AnotherTest
899ca245ae
LibCrypto: Implement Cipher and AES_CBC
...
Also adds a test program to userland
2020-05-02 12:24:10 +02:00