Commit c8d67f10 authored by Fabio Utzig's avatar Fabio Utzig Committed by Fabio Utzig
Browse files

Add TLV gen for RSA sig+enc

Signed-off-by: default avatarFabio Utzig <utzig@apache.org>
parent 04fd63e6
Loading
Loading
Loading
Loading
+8
Changes for sim/src/lib.rs: 8 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -1139,6 +1139,7 @@ fn install_image(flash: &mut Flash, slots: &[SlotInfo], slot: usize, len: usize,

// The TLV in use depends on what kind of signature we are verifying.
#[cfg(feature = "sig-rsa")]
#[cfg(not(feature = "enc-rsa"))]
fn make_tlv() -> TlvGen {
    TlvGen::new_rsa_pss()
}
@@ -1148,11 +1149,18 @@ fn make_tlv() -> TlvGen {
    TlvGen::new_ecdsa()
}

#[cfg(not(feature = "sig-rsa"))]
#[cfg(feature = "enc-rsa")]
fn make_tlv() -> TlvGen {
    TlvGen::new_enc_rsa()
}

#[cfg(feature = "sig-rsa")]
#[cfg(feature = "enc-rsa")]
fn make_tlv() -> TlvGen {
    TlvGen::new_sig_enc_rsa()
}

#[cfg(feature = "enc-kw")]
fn make_tlv() -> TlvGen {
    TlvGen::new_enc_kw()