Skip to content

Commit

Permalink
Merge pull request #324 from trail-of-forks/jl/ring-webpki
Browse files Browse the repository at this point in the history
dep: update rustls-webpki, fold in pki_types
  • Loading branch information
flavio authored Jan 15, 2024
2 parents 14de0b6 + 741a2a9 commit 8861f2e
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 10 deletions.
3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,7 @@ url = "2.2.2"
x509-cert = { version = "0.2.2", features = ["builder", "pem", "std"] }
crypto_secretbox = "0.1.1"
zeroize = "1.5.7"
rustls-webpki = { version = "0.102.0-alpha.7", features = ["alloc"] }
rustls-pki-types = { version = "1.0.0", features = ["std"] }
rustls-webpki = { version = "0.102.1", features = ["alloc"] }
serde_repr = "0.1.16"
hex = "0.4.3"
json-syntax = { version = "0.10.0", features = ["canonicalize", "serde"] }
Expand Down
2 changes: 1 addition & 1 deletion src/cosign/client_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

use rustls_pki_types::CertificateDer;
use tracing::info;
use webpki::types::CertificateDer;

use super::client::Client;
use crate::crypto::SigningScheme;
Expand Down
2 changes: 1 addition & 1 deletion src/cosign/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -283,9 +283,9 @@ where

#[cfg(test)]
mod tests {
use rustls_pki_types::CertificateDer;
use serde_json::json;
use std::collections::HashMap;
use webpki::types::CertificateDer;

use super::constraint::{AnnotationMarker, PrivateKeySigner};
use super::*;
Expand Down
2 changes: 1 addition & 1 deletion src/cosign/signature_layers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ impl CertificateSignature {
// ensure the certificate has been issued by Fulcio
fulcio_cert_pool.verify_pem_cert(
cert_pem,
Some(rustls_pki_types::UnixTime::since_unix_epoch(
Some(webpki::types::UnixTime::since_unix_epoch(
cert.tbs_certificate.validity.not_before.to_unix_duration(),
)),
)?;
Expand Down
2 changes: 1 addition & 1 deletion src/cosign/verification_constraint/certificate_verifier.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use chrono::{DateTime, NaiveDateTime, Utc};
use pkcs8::der::Decode;
use rustls_pki_types::CertificateDer;
use std::convert::TryFrom;
use tracing::warn;
use webpki::types::CertificateDer;
use x509_cert::Certificate;

use super::VerificationConstraint;
Expand Down
6 changes: 4 additions & 2 deletions src/crypto/certificate_pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@
// limitations under the License.

use const_oid::db::rfc5280::ID_KP_CODE_SIGNING;
use rustls_pki_types::{CertificateDer, TrustAnchor, UnixTime};
use webpki::{EndEntityCert, KeyUsage};
use webpki::{
types::{CertificateDer, TrustAnchor, UnixTime},
EndEntityCert, KeyUsage,
};

use crate::errors::{Result, SigstoreError};

Expand Down
2 changes: 1 addition & 1 deletion src/registry/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@

//! Set of structs and enums used to define how to interact with OCI registries
use rustls_pki_types::CertificateDer;
use serde::Serialize;
use std::cmp::Ordering;
use std::convert::From;
use webpki::types::CertificateDer;

use crate::errors;

Expand Down
2 changes: 1 addition & 1 deletion src/tuf/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ use std::{
mod constants;
mod trustroot;

use rustls_pki_types::CertificateDer;
use sha2::{Digest, Sha256};
use tough::TargetName;
use tracing::debug;
use webpki::types::CertificateDer;

use self::trustroot::{CertificateAuthority, TimeRange, TransparencyLogInstance, TrustedRoot};

Expand Down

0 comments on commit 8861f2e

Please sign in to comment.