Skip to content

Commit

Permalink
x509-tsp: make crate no_std
Browse files Browse the repository at this point in the history
Signed-off-by: Arthur Gautier <[email protected]>
  • Loading branch information
baloo committed Aug 1, 2023
1 parent 8bd0903 commit 10ae6ee
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 3 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/x509-tsp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,25 @@ env:
RUSTFLAGS: "-Dwarnings"

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- 1.65.0 # MSRV
- stable
target:
- thumbv7em-none-eabi
- wasm32-unknown-unknown
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
targets: ${{ matrix.target }}
- uses: RustCrypto/actions/cargo-hack-install@master
- run: cargo hack build --target ${{ matrix.target }} --feature-powerset --exclude-features arbitrary,builder,default,std

minimal-versions:
uses: RustCrypto/actions/.github/workflows/minimal-versions.yml@master
with:
Expand Down
6 changes: 3 additions & 3 deletions x509-tsp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ Pure Rust implementation of the Timestamping Protocol as described in RFC 3161.
authors = ["RustCrypto Developers"]
license = "Apache-2.0 OR MIT"
repository = "https://github.com/RustCrypto/formats/tree/master/x509-tsp"
categories = ["cryptography", "encoding", "parser-implementations"]
categories = ["cryptography", "encoding", "no-std", "parser-implementations"]
keywords = ["crypto", "tsp", "timestamp"]
readme = "README.md"
rust-version = "1.65"

[dependencies]
der = { version = "0.7.6", features = ["alloc", "derive", "oid", "pem"] }
cms = { version = "0.2.1", features = ["alloc", "std"] }
cmpv2 = { version = "0.2", features = ["alloc", "std"] }
cms = { version = "0.2.1", features = ["alloc"] }
cmpv2 = { version = "0.2", features = ["alloc"] }
x509-cert = { version = "0.2.4", default-features = false }

[dev-dependencies]
Expand Down
11 changes: 11 additions & 0 deletions x509-tsp/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
#![no_std]
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![doc = include_str!("../README.md")]
#![doc(
html_logo_url = "https://raw.githubusercontent.com/RustCrypto/media/6ee8e381/logo.svg",
html_favicon_url = "https://raw.githubusercontent.com/RustCrypto/media/6ee8e381/logo.svg"
)]

extern crate alloc;

use cmpv2::status::PkiStatusInfo;
use cms::content_info::ContentInfo;
use der::{
Expand Down Expand Up @@ -131,6 +141,7 @@ pub struct Accuracy {
#[cfg(test)]
mod tests {
use super::*;
use alloc::string::ToString;
use cmpv2::status::*;
use cms::signed_data::SignedData;
use der::oid::db::rfc5912::ID_SHA_256;
Expand Down

0 comments on commit 10ae6ee

Please sign in to comment.