Upgrade signing key generation (#379)
* adds the upgrade signing key generation and the partition offset * use openssl in build.rs instead
This commit is contained in:
@@ -57,6 +57,10 @@ impl UpgradeStorage for BufferUpgradeStorage {
|
||||
}
|
||||
}
|
||||
|
||||
fn partition_address(&self) -> usize {
|
||||
0x60000
|
||||
}
|
||||
|
||||
fn partition_length(&self) -> usize {
|
||||
PARTITION_LENGTH
|
||||
}
|
||||
|
||||
@@ -317,6 +317,10 @@ impl UpgradeStorage for SyscallUpgradeStorage {
|
||||
}
|
||||
}
|
||||
|
||||
fn partition_address(&self) -> usize {
|
||||
self.partition.start()
|
||||
}
|
||||
|
||||
fn partition_length(&self) -> usize {
|
||||
self.partition.length()
|
||||
}
|
||||
|
||||
@@ -34,6 +34,9 @@ pub trait UpgradeStorage {
|
||||
/// Returns [`StorageError::OutOfBounds`] if the data does not fit the partition.
|
||||
fn write_partition(&mut self, offset: usize, data: &[u8]) -> StorageResult<()>;
|
||||
|
||||
/// Returns the address of the partition.
|
||||
fn partition_address(&self) -> usize;
|
||||
|
||||
/// Returns the length of the partition.
|
||||
fn partition_length(&self) -> usize;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user