Skip to content

Commit

Permalink
Remove signature format field
Browse files Browse the repository at this point in the history
The presence of the field does not allow a hashedrekord entry to be
parsed properly.

Signed-off-by: Lily Sturmann <lsturman@redhat.com>
  • Loading branch information
lkatalin committed Oct 24, 2022
1 parent 4849fb7 commit b544d25
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 13 deletions.
4 changes: 0 additions & 4 deletions examples/rekor/create_log_entry/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,6 @@ async fn main() {
.to_owned(),
);
let signature = Signature::new(
flags
.get_one::<String>("key_format")
.unwrap_or(&KEY_FORMAT.to_string())
.to_owned(),
flags
.get_one("signature")
.unwrap_or(&SIGNATURE.to_string())
Expand Down
4 changes: 0 additions & 4 deletions examples/rekor/search_log_query/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,6 @@ async fn main() {
.to_owned(),
);
let signature = Signature::new(
flags
.get_one::<String>("key_format")
.unwrap_or(&KEY_FORMAT.to_string())
.to_owned(),
flags
.get_one::<String>("signature")
.unwrap_or(&SIGNATURE.to_string())
Expand Down
8 changes: 3 additions & 5 deletions src/rekor/models/hashedrekord.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,13 @@ impl Spec {
#[derive(Debug, Clone, Eq, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Signature {
format: String,
content: String,
public_key: PublicKey,
pub content: String,
pub public_key: PublicKey,
}

impl Signature {
pub fn new(format: String, content: String, public_key: PublicKey) -> Signature {
pub fn new(content: String, public_key: PublicKey) -> Signature {
Signature {
format,
content,
public_key,
}
Expand Down

0 comments on commit b544d25

Please sign in to comment.