Skip to content

Commit

Permalink
Merge pull request C2SP#35 from carl-wallace/pbyk
Browse files Browse the repository at this point in the history
Add Send to several PkiEnvironment interfaces. Bump version.
  • Loading branch information
carl-wallace authored Dec 6, 2023
2 parents c16e38c + 3405ab0 commit 2dbd11e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion certval/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "certval"
version = "0.1.3"
version = "0.1.4"
description = """
Pure Rust implementation of X.509 Public Key Infrastructure Certificate validation as described in [RFC 5280] and
as augmented by [RFC 5937], including support for certification path building and revocation status determination.
Expand Down
22 changes: 11 additions & 11 deletions certval/src/environment/pki_environment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,31 +75,31 @@ pub struct PkiEnvironment {
//--------------------------------------------------------------------------
/// List of trait objects that provide access to trust anchors
#[cfg(feature = "std")]
trust_anchor_sources: Vec<Box<(dyn TrustAnchorSource + Sync)>>,
trust_anchor_sources: Vec<Box<(dyn TrustAnchorSource + Send + Sync)>>,
#[cfg(not(feature = "std"))]
trust_anchor_sources: Vec<Box<(dyn TrustAnchorSource)>>,

/// List of trait objects that provide access to certificates
#[cfg(feature = "std")]
certificate_sources: Vec<Box<(dyn CertificateSource + Sync)>>,
certificate_sources: Vec<Box<(dyn CertificateSource + Send + Sync)>>,
#[cfg(not(feature = "std"))]
certificate_sources: Vec<Box<(dyn CertificateSource)>>,

/// List of trait objects that provide access to CRLs
#[cfg(feature = "std")]
crl_sources: Vec<Box<(dyn CrlSource + Sync)>>,
crl_sources: Vec<Box<(dyn CrlSource + Send + Sync)>>,
#[cfg(not(feature = "std"))]
crl_sources: Vec<Box<(dyn CrlSource)>>,

/// List of trait objects that provide access to cached revocation status determinations
#[cfg(feature = "std")]
revocation_cache: Vec<Box<(dyn RevocationStatusCache + Sync)>>,
revocation_cache: Vec<Box<(dyn RevocationStatusCache + Send + Sync)>>,
#[cfg(not(feature = "std"))]
revocation_cache: Vec<Box<(dyn RevocationStatusCache)>>,

/// List of trait objects that provide access to blocklist and last modified info
#[cfg(feature = "std")]
check_remote: Vec<Box<(dyn CheckRemoteResource + Sync)>>,
check_remote: Vec<Box<(dyn CheckRemoteResource + Send + Sync)>>,
#[cfg(not(feature = "std"))]
check_remote: Vec<Box<(dyn CheckRemoteResource)>>,

Expand Down Expand Up @@ -284,7 +284,7 @@ impl PkiEnvironment {

/// add_trust_anchor_source adds a [`TrustAnchorSource`] object to the list used by get_trust_anchor.
#[cfg(feature = "std")]
pub fn add_trust_anchor_source(&mut self, c: Box<(dyn TrustAnchorSource + Sync)>) {
pub fn add_trust_anchor_source(&mut self, c: Box<(dyn TrustAnchorSource + Send + Sync)>) {
self.trust_anchor_sources.push(c);
}

Expand Down Expand Up @@ -371,7 +371,7 @@ impl PkiEnvironment {

/// add_certificate_source adds a [`CertificateSource`] object to the list.
#[cfg(feature = "std")]
pub fn add_certificate_source(&mut self, c: Box<(dyn CertificateSource + Sync)>) {
pub fn add_certificate_source(&mut self, c: Box<(dyn CertificateSource + Send + Sync)>) {
self.certificate_sources.push(c);
}

Expand All @@ -388,7 +388,7 @@ impl PkiEnvironment {

/// add_crl_source adds a [`CrlSource`] object to the list.
#[cfg(feature = "std")]
pub fn add_crl_source(&mut self, c: Box<(dyn CrlSource + Sync)>) {
pub fn add_crl_source(&mut self, c: Box<(dyn CrlSource + Send + Sync)>) {
self.crl_sources.push(c);
}

Expand Down Expand Up @@ -435,7 +435,7 @@ impl PkiEnvironment {

/// add_revocation_cache adds a [`RevocationStatusCache`] object to the list.
#[cfg(feature = "std")]
pub fn add_revocation_cache(&mut self, c: Box<(dyn RevocationStatusCache + Sync)>) {
pub fn add_revocation_cache(&mut self, c: Box<(dyn RevocationStatusCache + Send + Sync)>) {
self.revocation_cache.push(c);
}

Expand Down Expand Up @@ -516,7 +516,7 @@ impl PkiEnvironment {

/// add_check_remote adds a [`CheckRemoteResource`] object to the list.
#[cfg(feature = "std")]
pub fn add_check_remote(&mut self, c: Box<(dyn CheckRemoteResource + Sync)>) {
pub fn add_check_remote(&mut self, c: Box<(dyn CheckRemoteResource + Send + Sync)>) {
self.check_remote.push(c);
}

Expand Down Expand Up @@ -590,4 +590,4 @@ pub fn populate_5280_pki_environment(pe: &mut PkiEnvironment) {
pe.add_verify_signature_message_callback(verify_signature_message_pqcrypto);
#[cfg(feature = "pqc")]
pe.add_verify_signature_message_callback(verify_signature_message_composite_pqcrypto);
}
}

0 comments on commit 2dbd11e

Please sign in to comment.