mirror of
https://github.com/signalapp/libsignal.git
synced 2024-09-20 03:52:17 +02:00
bridge: DeviceTransfer_GeneratePrivateKey can't fail in practice
The device_transfer crate is very conservative about internal failures, but there's nothing an app-level caller can do about such a problem, so it might as well be subsumed in panic catching.
This commit is contained in:
parent
ad53b54901
commit
55563113f4
@ -12,9 +12,10 @@ use crate::support::*;
|
||||
use crate::*;
|
||||
|
||||
#[bridge_fn(node = false)]
|
||||
fn DeviceTransfer_GeneratePrivateKey() -> Result<Vec<u8>, device_transfer::Error> {
|
||||
fn DeviceTransfer_GeneratePrivateKey() -> Vec<u8> {
|
||||
const DEVICE_TRANSFER_KEY_BITS: usize = 4096;
|
||||
device_transfer::create_rsa_private_key(DEVICE_TRANSFER_KEY_BITS, KeyFormat::Pkcs8)
|
||||
.expect("no internal failures")
|
||||
}
|
||||
|
||||
// TODO: needed for iOS at the moment, but since it is more generic, could bridge it to JNI as well
|
||||
|
Loading…
Reference in New Issue
Block a user