Skip to content

Commit

Permalink
fix provisioner app
Browse files Browse the repository at this point in the history
  • Loading branch information
conorpp committed Aug 7, 2021
1 parent 4baf062 commit d2c7205
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,22 @@ jobs:
- name: Size
run: |
cargo size --release --features ${{ matrix.board }}
- name: Artifacts
- name: Upload Firmware
uses: actions/upload-artifact@v2
continue-on-error: true
with:
name: Firmware
path: runners/lpc55/target/thumbv8m.main-none-eabi/release/runner
- name: Build Provisioner
run: |
cargo objcopy --release --features ${{ matrix.board }} -- -O binary firmware-${{ matrix.board }}.bin
sudo cp *.bin /
- name: Upload
cargo build --release --features ${{ matrix.board }},provisioner-app,admin-app,trussed/clients-2,provisioner-app/test-attestation
- name: Upload Provisioner
uses: actions/upload-artifact@v2
continue-on-error: true
with:
name: Binaries
path: ./runners/lpc55/*.bin
name: Provisioner
path: runners/lpc55/target/thumbv8m.main-none-eabi/release/runner


build-pc:
runs-on: ${{ matrix.os }}
Expand Down
4 changes: 2 additions & 2 deletions components/provisioner-app/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ where S: Store,

match p1 {
_x if p1 == TestAttestationP1::P256Sign as u8 => {
let sig: Vec<MAX_SIGNATURE_LENGTH> = syscall!(self.trussed.sign(
let sig: trussed::Bytes<MAX_SIGNATURE_LENGTH> = syscall!(self.trussed.sign(
Mechanism::P256,
KeyId::from_special(1),
&challenge,
Expand All @@ -433,7 +433,7 @@ where S: Store,
}
_x if p1 == TestAttestationP1::Ed255Sign as u8 => {

let sig: Vec<MAX_SIGNATURE_LENGTH> = syscall!(self.trussed.sign(
let sig: trussed::Bytes<MAX_SIGNATURE_LENGTH> = syscall!(self.trussed.sign(
Mechanism::Ed255,
KeyId::from_special(2),
&challenge,
Expand Down
2 changes: 1 addition & 1 deletion runners/lpc55/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ pub struct ProvisionerNonPortable {

#[cfg(feature = "provisioner-app")]
impl TrussedApp for ProvisionerApp {
const CLIENT_ID: &'static [u8] = b"pro\0";
const CLIENT_ID: &'static [u8] = b"attn\0";

type NonPortable = ProvisionerNonPortable;
fn with_client(trussed: TrussedClient, ProvisionerNonPortable { store, stolen_filesystem, nfc_powered }: Self::NonPortable) -> Self {
Expand Down

0 comments on commit d2c7205

Please sign in to comment.