Move (signed) pre-keys into database
Pre-keys were also quirky in Whisperfish 0.5, and for proper migration they should probably be stored in the database:
/// Adds quirks to the pre key data format that are apparent in Whisperfish 0.5
pub fn pre_key_to_0_5(input: &[u8]) -> Result<Vec<u8>, SignalProtocolError> {
let mut obj = PreKeyRecordStructure::decode(input).map_err(prost_err_to_signal)?;
// begin quirking
quirk_identity(&mut obj.public_key)?;
// end quirking
Ok(obj.encode_to_vec())
}
This is a follow-up from !249 (merged) and #74 (closed).
Signal is less likely to change things to the format here, but we should assume black-box access to pre-keys and signed pre-keys anyway.