- Sep 10, 2020
-
-
Joe Richey authored
This makes sure we get a good compiler error if we give a bad path. Signed-off-by:
Joe Richey <joerichey@google.com>
-
Joe Richey authored
Signed-off-by:
Joe Richey <joerichey@google.com>
-
Joe Richey authored
Signed-off-by:
Joe Richey <joerichey@google.com>
-
Joe Richey authored
Signed-off-by:
Joe Richey <joerichey@google.com>
-
Joe Richey authored
Include more links, exampales, and clarify wording Signed-off-by:
Joe Richey <joerichey@google.com>
-
Joe Richey authored
Signed-off-by:
Joe Richey <joerichey@google.com>
-
Joe Richey authored
The main things here are clarifying how fallback functionatliy works. Signed-off-by:
Joe Richey <joerichey@google.com>
-
- Aug 14, 2020
-
-
Joe Richey authored
Older NetBSD kernels cannot handle buffers bigger than 256 bytes, and all FreeBSD and NetBSD kernels only return up to 256 bytes per call. Signed-off-by:
Joe Richey <joerichey@google.com>
-
- Jul 22, 2020
-
-
Joe Richey authored
-
Artyom Pavlov authored
Minimum supported kernel version got bumped to 2.6.32 in rust-lang/rust#74163
-
- May 29, 2020
-
-
Joe Richey authored
Add back the "test-in-browser" feature. This makes it easier to manage a single file containing all of the test code. Signed-off-by:
Joe Richey <joerichey@google.com>
-
Joe Richey authored
They will be gated behind the "js" feature, as we can now do detect, at compile-time, which implementation (wasm-bindgen vs stdweb) we should use. The "js" implementation takes precedence over the "custom" implementation. This prevents issues that arise from the buggy way Cargo handles features across multiple targets. Signed-off-by:
Joe Richey <joerichey@google.com>
-
Joe Richey authored
Signed-off-by:
Joe Richey <joerichey@google.com>
-
Joe Richey authored
Right now, features are always enabled across all targets. This means that if _any_ Custom RNG is used _anywhere_ in a crate's dependancy graph on _any_ target. The "custom" feature will be active on all targets. This makes it impossible to have a bare metal target that uses "cpu" on x86_64 and a Custom RNG on aarch64. This solution also makes sure that any implementation `getrandom` itself provides cannot be overridden. Signed-off-by:
Joe Richey <joerichey@google.com>
-
- May 25, 2020
-
-
Joe Richey authored
Right now, while our implementations for stdweb and wasm-bindgen use similar APIs, they do not use similar implementations. This change: - Switches to using the same error codes for both implementations - Uses error codes that detail exactly what API is missing - Cleans up the implemetnations to make them much more readable - Consitantly use thread_local in both implementations This makes issues easier to debug and the code easier to understand. Signed-off-by:
Joe Richey <joerichey@google.com>
-
- Apr 27, 2020
-
-
Joe Richey authored
-
Joe Richey authored
The type of the `rnd` parameter is SecRandomRef which is an alias for an "Opaque Pointer". This is better represented in Rust as a c_void pointer. We also know that kSecRandomDefault is NULL, so we can simplify the code. https://developer.apple.com/documentation/security/1399291-secrandomcopybytes https://developer.apple.com/documentation/security/secrandomref https://developer.apple.com/documentation/swift/imported_c_and_objective-c_apis/using_imported_c_functions_in_swift
-
Joe Richey authored
As our minimum rust version is 1.33, we can just use `target_vendor`.
-
Joe Richey authored
- Use debug asserts in code - Use normal asserts in tests - Use *assert_eq! methods when possible - Remove unnecessary asserts
-
Joe Richey authored
Also make Error::code a const fn. These increase the Min Rust version to 1.33
-
- Feb 20, 2020
-
-
Joe Richey authored
Also add tests for 32-bit x86
-
- Feb 19, 2020
-
-
Joe Richey authored
This allows us to verify the RDRAND implementation on Linux. Signed-off-by:
Joe Richey <joerichey@google.com>
-
Joe Richey authored
- Cleanup .travis.yml - Loops over std/no_std targets - Remove deprecated/useless keys - No more `cd`, we just use `--package`. - Improve tests - Main `getrandom` tests are now unit test modules instead of integration tests, making the code cleaner. - The custom RNG crates now use this common module as part of their integration tests. - No more weird test-only features needed to get the crate to build. Signed-off-by:
Joe Richey <joerichey@google.com>
-
Joe Richey authored
This allows freestanding targets to use getrandom. Signed-off-by:
Joe Richey <joerichey@google.com>
-
Joe Richey authored
We will use a more generic "cpu" mechanism to support these. Signed-off-by:
Joe Richey <joerichey@google.com>
-
Joe Richey authored
Signed-off-by:
Joe Richey <joerichey@google.com>
-
- Jan 10, 2020
-
-
Joe Richey authored
-
Joe Richey authored
-
Joe Richey authored
-
Joe Richey authored
-
- Jan 09, 2020
-
-
Joseph Richey authored
This feature isn't enabled by rand/rand_core and provides very little error information that isn't already conveyed through our Error values. This also simplifies the supported configuration space for getrandom. We update the docs and CI to match this change.
-
- Jan 07, 2020
-
-
Joe Richey authored
We no longer use spin-locks anywhere in getrandom, so remove any interfaces which spin. Signed-off-by:
Joe Richey <joerichey@google.com>
-
Joe Richey authored
Don't spin when polling /dev/random. We also remove the use of spin locks when opening the persistent fd for platforms that require it. For both these cases, we can just use the pthread lock/unlock methods in libc. This includes adding Mutex and DropGuard abstractions. Signed-off-by:
Joe Richey <joerichey@google.com>
-
Joe Richey authored
Signed-off-by:
Joe Richey <joerichey@google.com>
-
Joseph Richey authored
-
- Jan 05, 2020
-
-
Joseph Richey authored
-
- Oct 28, 2019
-
-
Joseph Richey authored
-
- Oct 25, 2019
-
-
Joseph Richey authored
Right now for each of `util_libc` and `use_file` we have a list of `target_os` configs to determine if we build the module. This PR moves these mod declarations into the main `cfg_if` statement (the one that selects which implementation we use). This way, the mod statements are kept in-sync with the implementations that use them. Also, I merged together `target_os` cfgs that have the same implementation. The downside to this is that the targets are no longer in alphabetical order. Also, this is only being applied to `0.2` as the `0.1` cfgs still have to keep `std` around.
-
- Oct 24, 2019
-
-
Joseph Richey authored
-
- Oct 23, 2019
-
-
Artyom Pavlov authored
-