Skip to content

Commit

Permalink
Remove SeqCursor
Browse files Browse the repository at this point in the history
  • Loading branch information
ikrivosheev committed Mar 8, 2023
1 parent 026b997 commit 085dd33
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 153 deletions.
3 changes: 0 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,6 @@ pub use crate::errors::*;
pub(crate) mod constants;
pub use crate::constants::*;

#[cfg(feature = "signature-meta")]
mod sequential_cursor;

mod rpm;
pub use crate::rpm::*;

Expand Down
12 changes: 6 additions & 6 deletions src/rpm/builder.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::collections::{BTreeMap, BTreeSet};
use std::convert::TryInto;

use std::io::{Read, Write};
use std::io::{self, Read, Write};
#[cfg(unix)]
use std::os::unix::fs::PermissionsExt;

Expand All @@ -15,8 +15,6 @@ use super::headers::*;
use super::Lead;
use crate::constants::*;

#[cfg(feature = "signature-meta")]
use crate::sequential_cursor::SeqCursor;
#[cfg(feature = "signature-meta")]
use crate::signature;

Expand Down Expand Up @@ -445,9 +443,11 @@ impl RPMBuilder {

let signature_header = {
let rsa_sig_header_only = signer.sign(header.as_slice())?;

let cursor = SeqCursor::new(&[header.as_slice(), content.as_slice()]);
let rsa_sig_header_and_archive = signer.sign(cursor)?;

let header_cursor = io::Cursor::new(header);
let content_cursor = io::Cursor::new(content.as_slice());
let header_and_content = header_cursor.chain(content_cursor);
let rsa_sig_header_and_archive = signer.sign(header_and_content)?;

builder
.add_signature(
Expand Down
144 changes: 0 additions & 144 deletions src/sequential_cursor.rs

This file was deleted.

0 comments on commit 085dd33

Please sign in to comment.