commit_hash
stringlengths
40
40
author
stringlengths
1
57
date
timestamp[s]date
2010-07-26 04:45:09
2026-04-14 18:21:10
message
stringlengths
8
1.39M
diff
stringlengths
68
51.2k
files_changed
int64
1
136
insertions
int64
0
2.35k
deletions
int64
0
1.9k
d2f847cbf2a448bb98da9be0fe86539765ccd519
Nick Santana
2023-03-07T16:41:47
Make `zeroize`'s `alloc` feature conditional (#920) Previously `zeroize`'s `alloc` feature would be enabled if `zeroize` was enabled. Now `zeroize`'s `alloc` feature is only enabled if this crate's `alloc` feature is enabled.
diff --git a/der/Cargo.toml b/der/Cargo.toml index 159a0382..778bb237 100644 --- a/der/Cargo.toml +++ b/der/Cargo.toml @@ -22,14 +22,14 @@ der_derive = { version = "0.7", optional = true, path = "derive" } flagset = { version = "0.4.3", optional = true } pem-rfc7468 = { version = "0.7", optional = true, features = ["...
1
2
2
25f821a47508b0af0350b7e060618a8201aa29bb
Tony Arcieri
2023-03-06T05:05:20
pkcs1: fixups for `DecodeRsaPublicKey` blanket impl (#916) Changes the error type to `spki::Error`, which matches the error type used in the `spki::DecodePublicKey` blanket impl: https://docs.rs/spki/0.7.0/spki/trait.DecodePublicKey.html#impl-DecodePublicKey-for-T Also removes the bounds on `DecodePublicKey` in...
diff --git a/pkcs1/src/traits.rs b/pkcs1/src/traits.rs index 1def6496..f8934ddd 100644 --- a/pkcs1/src/traits.rs +++ b/pkcs1/src/traits.rs @@ -169,9 +169,9 @@ where } #[cfg(feature = "pkcs8")] -impl<T: pkcs8::DecodePublicKey> DecodeRsaPublicKey for T +impl<T> DecodeRsaPublicKey for T where - T: for<'a> TryFrom<...
1
2
2
9888dad42f60870f3f414183d691e495fe10781f
Tony Arcieri
2023-03-05T15:07:02
pkcs5: bump `pbkdf2` to v0.12; `scrypt` to v0.11 (#913)
diff --git a/Cargo.lock b/Cargo.lock index 6ef1a95d..74f856fe 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -812,11 +812,12 @@ checksum = "9b7820b9daea5457c9f21c69448905d723fbd21136ccf521748f23fd49e723ee" [[package]] name = "pbkdf2" -version = "0.11.0" +version = "0.12.1" source = "registry+https://github.com/rust-l...
8
35
30
4b90dc09e4ce264f9841765434f01d3a495bc913
Franziskus Kiefer
2023-03-03T09:15:35
tls_codec: bump version to 0.3.0-pre.1 (#911)
diff --git a/Cargo.lock b/Cargo.lock index 09c2c8aa..6ef1a95d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1404,7 +1404,7 @@ dependencies = [ [[package]] name = "tls_codec" -version = "0.2.0" +version = "0.3.0-pre.1" dependencies = [ "arbitrary", "criterion", @@ -1416,7 +1416,7 @@ dependencies = [ [[package...
3
5
5
a42016a924739c2218fe963ce2da895a903d48cd
Damian Poddebniak
2023-03-02T13:53:16
tls_codec: feat: Append a comment with the hex representation of `VLBytes` during `Debug`-printing. (#910)
diff --git a/tls_codec/src/arrays.rs b/tls_codec/src/arrays.rs index 4bc3192b..36c818a4 100644 --- a/tls_codec/src/arrays.rs +++ b/tls_codec/src/arrays.rs @@ -17,8 +17,7 @@ impl<const LEN: usize> Serialize for [u8; LEN] { Ok(written) } else { Err(Error::InvalidWriteLength(format!( - ...
3
77
23
97d27f1399f3acecac78816cdf44e4b6d81ee302
Tony Arcieri
2023-02-28T04:25:35
sec1: encode `ECPrivateKey` version (#908) Regression where the version number was lost from the encoder as part of the changes in #828. It wasn't caught due to a lack of an encoding test, which has been added in this PR.
diff --git a/sec1/Cargo.toml b/sec1/Cargo.toml index b61879a9..a744bac4 100644 --- a/sec1/Cargo.toml +++ b/sec1/Cargo.toml @@ -30,12 +30,14 @@ tempfile = "3" [features] default = ["der", "point"] -alloc = ["der/alloc", "pkcs8/alloc", "zeroize/alloc"] +alloc = ["der?/alloc", "pkcs8?/alloc", "zeroize?/alloc"] std = ...
5
20
5
4a0cdafbc8ad60fb05915b8530d6165a3822a18f
Tony Arcieri
2023-02-27T20:11:28
x509-cert v0.2.0-pre.0 (#906)
diff --git a/Cargo.lock b/Cargo.lock index 4a9af4ba..be1c4f64 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1711,7 +1711,7 @@ dependencies = [ [[package]] name = "x509-cert" -version = "0.2.0-pre" +version = "0.2.0-pre.0" dependencies = [ "arbitrary", "const-oid 0.9.2", @@ -1723,7 +1723,7 @@ dependencies = [ ...
5
7
7
4c66ba0b8d96ce0610d0dd7ea99fa778aca6e290
Tony Arcieri
2023-02-26T16:16:38
der: refactor `INTEGER` canonicalization checks (#889)
diff --git a/der/src/asn1/integer/int.rs b/der/src/asn1/integer/int.rs index 5198a46f..bccc5210 100644 --- a/der/src/asn1/integer/int.rs +++ b/der/src/asn1/integer/int.rs @@ -123,8 +123,10 @@ impl_any_conversions!(IntRef<'a>, 'a); impl<'a> DecodeValue<'a> for IntRef<'a> { fn decode_value<R: Reader<'a>>(reader: ...
1
25
20
a487b95fdfafdec44ebcf3b16e6113e359f69b0a
Tony Arcieri
2023-02-26T05:43:51
der: remove `pub(super)` from integer functions (#888) Now that code has been factored into the appropriate modules in #881 the visibility of various integer decoding/encoding functions can be much more restricted. This removes `pub(super)` where it's now unnecessary.
diff --git a/der/src/asn1/integer/int.rs b/der/src/asn1/integer/int.rs index 129bc921..5198a46f 100644 --- a/der/src/asn1/integer/int.rs +++ b/der/src/asn1/integer/int.rs @@ -10,7 +10,7 @@ use core::cmp::Ordering; #[cfg(feature = "alloc")] pub use allocating::Int; -macro_rules! impl_encoding { +macro_rules! impl_en...
2
8
8
e96aa974c2d1d76fca7602d2c55afd2bc38f4d67
Tony Arcieri
2023-02-26T02:18:15
base64ct: bump dependencies (#885) This crate has its own Cargo.lock so it can still build on MSRV
diff --git a/base64ct/Cargo.lock b/base64ct/Cargo.lock index 469bfb6e..79d894dc 100644 --- a/base64ct/Cargo.lock +++ b/base64ct/Cargo.lock @@ -49,17 +49,44 @@ version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610...
1
141
13
293efc971d27c2687227262fe53ca2fb3fa8b001
Tony Arcieri
2023-02-25T22:49:20
der: refactor `Int*`/`Uint*` types (#881) Factors these types out of the (now-removed) `bigint` module into the `int` and `uint` modules respectively, avoiding other code changes and preserving all tests.
diff --git a/der/src/asn1.rs b/der/src/asn1.rs index 368ff6ea..dce9d6c9 100644 --- a/der/src/asn1.rs +++ b/der/src/asn1.rs @@ -35,7 +35,7 @@ pub use self::{ context_specific::{ContextSpecific, ContextSpecificRef}, generalized_time::GeneralizedTime, ia5_string::Ia5StringRef, - integer::bigint::{IntRef,...
6
673
666
ff3c9be033a9718e4ceccb5e09b45074481410a4
Tony Arcieri
2023-02-25T22:03:11
der: cleanup `Any*` conversions (#880) Renames the vague `impl_type!` macro to `impl_any_conversions!` and eliminates the use of superfluous nested modules.
diff --git a/der/src/asn1/bit_string.rs b/der/src/asn1/bit_string.rs index 4481a2eb..8eceec7d 100644 --- a/der/src/asn1/bit_string.rs +++ b/der/src/asn1/bit_string.rs @@ -117,7 +117,7 @@ impl<'a> BitStringRef<'a> { } } -impl_type!(BitStringRef<'a>, 'a); +impl_any_conversions!(BitStringRef<'a>, 'a); impl<'a> ...
7
24
46
efe280cd6d141e9c2d9e55f905b84f38aeac1075
Tony Arcieri
2023-02-25T21:21:39
Cargo.lock: update dependencies (#879)
diff --git a/Cargo.lock b/Cargo.lock index 65b68133..500dd4c5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -43,7 +43,7 @@ version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ - "hermit-abi", +...
1
256
123
3452f64113661099035f95b94ff7f5d09a2254e7
Tony Arcieri
2023-02-25T20:55:20
der: import cleanups (#878) Small cleanups to imports in the `asn1` module
diff --git a/der/src/asn1.rs b/der/src/asn1.rs index 2d24ee40..368ff6ea 100644 --- a/der/src/asn1.rs +++ b/der/src/asn1.rs @@ -28,17 +28,6 @@ mod utc_time; mod utf8_string; mod videotex_string; -#[cfg(feature = "oid")] -#[cfg_attr(docsrs, doc(cfg(feature = "oid")))] -pub use const_oid::ObjectIdentifier; - -#[cfg(fe...
1
18
13
5990852af1e06f26081d2761ea27925dbaa2a504
Paolo Capriotti
2023-02-23T12:00:30
Replace Read::read with read_exact (#876) Read::read is not guaranteed to fill the whole output buffer.
diff --git a/tls_codec/src/tls_vec.rs b/tls_codec/src/tls_vec.rs index 20003b18..b81682f8 100644 --- a/tls_codec/src/tls_vec.rs +++ b/tls_codec/src/tls_vec.rs @@ -56,24 +56,8 @@ macro_rules! impl_byte_deserialize { let mut result = Self { vec: vec![0u8; len], }; - l...
1
2
18
b20d644ad718db22618205bd0c1854c12e9bfe0e
William Woodruff
2023-02-15T22:41:10
x509-cert: std feature implies const-oid/std (#874) Signed-off-by: William Woodruff <william@yossarian.net>
diff --git a/x509-cert/Cargo.toml b/x509-cert/Cargo.toml index 171f3f3a..05a3c3b3 100644 --- a/x509-cert/Cargo.toml +++ b/x509-cert/Cargo.toml @@ -28,7 +28,7 @@ rstest = "0.16" [features] arbitrary = ["std", "dep:arbitrary", "const-oid/arbitrary", "der/arbitrary", "spki/arbitrary"] pem = ["der/pem"] -std = ["der/std...
1
1
1
08bb10d177c2b9b6c085b509a69c40c8cd5ea006
Xynnn_
2023-02-09T15:19:13
feat: Add bit tests for KeyUsage (#870) Signed-off-by: Xynnn007 <xynnn@linux.alibaba.com>
diff --git a/x509-cert/src/ext/pkix/keyusage.rs b/x509-cert/src/ext/pkix/keyusage.rs index cd051fed..61c08623 100644 --- a/x509-cert/src/ext/pkix/keyusage.rs +++ b/x509-cert/src/ext/pkix/keyusage.rs @@ -53,6 +53,65 @@ impl AssociatedOid for KeyUsage { impl_newtype!(KeyUsage, FlagSet<KeyUsages>); +impl KeyUsage { +...
1
59
0
ae147a01fd4decc9c278fbf5b4df9e481ec93a07
daxpedda
2023-01-30T23:16:23
serdect: Fix TOML test (#864)
diff --git a/Cargo.lock b/Cargo.lock index d415e5d0..25174e20 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -688,6 +688,15 @@ dependencies = [ "autocfg", ] +[[package]] +name = "nom8" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae01545c9c7fc4486ab7debaf2aad7003ac...
3
89
25
a34be8b65b0ac5cc6cfbb4896aa433b97fd3162a
Carl Wallace
2023-01-25T13:44:57
Blanket impls on `Box<T>` for `DecodeValue`, `EncodeValue` and `Sequence` (#860)
diff --git a/cms/src/enveloped_data.rs b/cms/src/enveloped_data.rs index 71c5ff64..9d0d06d7 100644 --- a/cms/src/enveloped_data.rs +++ b/cms/src/enveloped_data.rs @@ -1,5 +1,4 @@ //! EnvelopedData-related types -use alloc::boxed::Box; use core::cmp::Ordering; use const_oid::ObjectIdentifier; @@ -52,25 +51,6 @@ pub...
7
36
253
511fa7ec440807f1803a02bb4d78dfb29a67b08b
Carl Wallace
2023-01-24T02:11:19
cms: remove `allow(clippy::large_enum_variant)` from `PkiArchiveOptions` (#856)
diff --git a/Cargo.lock b/Cargo.lock index 6ea94728..d415e5d0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -298,6 +298,8 @@ dependencies = [ name = "crmf" version = "0.0.0" dependencies = [ + "cms", + "const-oid", "der", "spki", "x509-cert", diff --git a/cms/src/enveloped_data.rs b/cms/src/enveloped_data.rs ind...
6
66
11
fada54405f44cf7f46d0c810a81d2d72d0ca73e3
Franziskus Kiefer
2023-01-23T18:54:59
tls_codec: fix generics (#855) * Implement codec for PhantomData<T> * Fix derive of generic structs
diff --git a/tls_codec/derive/src/lib.rs b/tls_codec/derive/src/lib.rs index 43d50291..7232a233 100644 --- a/tls_codec/derive/src/lib.rs +++ b/tls_codec/derive/src/lib.rs @@ -510,8 +510,9 @@ fn impl_tls_size(parsed_ast: TlsStruct) -> TokenStream2 { .iter() .map(|p| p.for_trait("Size"))...
3
63
11
8ab2bb0ff924b4027ab9e97c5379c33aa57c3338
William Woodruff
2023-01-20T17:40:27
der, x509-cert: fix handling of negative integers (#831)
diff --git a/der/src/asn1/integer.rs b/der/src/asn1/integer.rs index d205ca97..5e892de1 100644 --- a/der/src/asn1/integer.rs +++ b/der/src/asn1/integer.rs @@ -43,7 +43,7 @@ macro_rules! impl_int_encoding { impl EncodeValue for $int { fn value_len(&self) -> Result<Length> { ...
4
84
16
15c945f3c0a4c4d00ac09fc83797b887270e6566
Austin Bonander
2023-01-13T14:45:26
der: add `OctetString::into_bytes()` (#845) This makes it possible to extract the owned data without copying.
diff --git a/der/src/asn1/octet_string.rs b/der/src/asn1/octet_string.rs index f30d3d07..be57eda3 100644 --- a/der/src/asn1/octet_string.rs +++ b/der/src/asn1/octet_string.rs @@ -132,6 +132,11 @@ mod allocating { self.inner.as_slice() } + /// Take ownership of the octet string. + p...
1
5
0
7f913886f5120ec8ad237a18286942dec489aeff
Nathaniel McCallum
2023-01-10T00:11:22
Misc. improvements for x509-certs (#841) https://github.com/RustCrypto/formats/pull/806 The above PR made most types in this crate owned. However, some types were missed. For consistency, complete the migration. Removed alloc feature: this crate unconditionally requires alloc. Signed-off-by: Nathaniel McCal...
diff --git a/pkcs7/src/revocation_info_choices.rs b/pkcs7/src/revocation_info_choices.rs index a332313c..232a5acb 100644 --- a/pkcs7/src/revocation_info_choices.rs +++ b/pkcs7/src/revocation_info_choices.rs @@ -19,7 +19,7 @@ use x509_cert::crl::CertificateList; #[allow(clippy::large_enum_variant)] pub enum Revocation...
12
60
90
eab27eaa999aecb09523a15e123c83958e4f8dc9
Arthur Gautier
2023-01-04T19:40:00
der: missing impl TryFrom<AnyRef> (#834) This removes some duplication but most importantly adds the missing implementations.
diff --git a/der/src/asn1/any.rs b/der/src/asn1/any.rs index 25dd957a..52701e0c 100644 --- a/der/src/asn1/any.rs +++ b/der/src/asn1/any.rs @@ -8,9 +8,6 @@ use crate::{ }; use core::cmp::Ordering; -#[cfg(feature = "alloc")] -use {crate::BytesOwned, alloc::boxed::Box}; - /// ASN.1 `ANY`: represents any explicitly ta...
12
403
557
953ad233be9845fb1858be76ed5437de6b97c193
Arthur Gautier
2023-01-03T18:03:20
der, spki: rename to_owned method (#835) The naming of the `to_owned` method was a bit unfortunate as it triggered conflicts with the `alloc::borrow::ToOwned` method. When used, this would make for compiler messages asking things like: ``` error[E0034]: multiple applicable items in scope --> certval/src/vali...
diff --git a/der/src/asn1/any.rs b/der/src/asn1/any.rs index 72004b7c..25dd957a 100644 --- a/der/src/asn1/any.rs +++ b/der/src/asn1/any.rs @@ -277,7 +277,7 @@ mod allocating { impl<'a> RefToOwned<'a> for AnyRef<'a> { type Owned = Any; - fn to_owned(&self) -> Self::Owned { + fn ref_to_owned...
13
45
45
1f1dd1aeb67a8c2e46f261aed5110cfb73907093
Tony Arcieri
2023-01-02T16:49:23
der: add `IndefiniteLength` type (#830) Per #823 and #827, making PKCS#7 work interoperably will involve supporting at limited number of BER productions, one of which is indefinite lengths. The current built-in `Length` type rejects them, as a proper DER parser is expected to. This commit adds a separate `Ind...
diff --git a/der/src/error.rs b/der/src/error.rs index 5e492a48..38fc71f8 100644 --- a/der/src/error.rs +++ b/der/src/error.rs @@ -197,6 +197,9 @@ pub enum ErrorKind { #[cfg_attr(docsrs, doc(cfg(feature = "std")))] Io(std::io::ErrorKind), + /// Indefinite length disallowed. + IndefiniteLength, + ...
3
134
4
b79a4c1adb64661f0c77a973e46b70a5f818957e
Carl Wallace
2023-01-02T14:12:47
der: add `Any::value` accessor (#833) * add value function to Any. change BasicOcspResponse to use AlgorithmIdentifierOwned (the repo needs similar owned treatment as x509-cert but changing this one field is an immediate need). * address clippy warning
diff --git a/der/src/asn1/any.rs b/der/src/asn1/any.rs index 3856191b..72004b7c 100644 --- a/der/src/asn1/any.rs +++ b/der/src/asn1/any.rs @@ -184,6 +184,11 @@ impl Any { Ok(Self { tag, value }) } + /// Allow access to value + pub fn value(&self) -> &[u8] { + self.value.as_slice() + } + ...
2
7
2
4e2266edf1ecfa049fdcc2e4afa9f22d20021a4a
Tony Arcieri
2023-01-01T22:30:33
der: remove inherent `AnyRef` decoding methods (#829) Also renames `decode_into` -> `decode_as` Removes almost all inherent methods for inherent ASN.1 types like `AnyRef::oid` and `AnyRef::octet_string`. `Any::sequence` is retained. Replaces them with `Any::decode_as<T>`. This simplifies the API by pushing t...
diff --git a/der/src/asn1/any.rs b/der/src/asn1/any.rs index 5a629ab7..3856191b 100644 --- a/der/src/asn1/any.rs +++ b/der/src/asn1/any.rs @@ -1,18 +1,16 @@ //! ASN.1 `ANY` type. + #![cfg_attr(feature = "arbitrary", allow(clippy::integer_arithmetic))] use crate::{ - asn1::*, BytesRef, Choice, Decode, DecodeValu...
20
63
94
7b59dbf1708002346345860f54fd0ed5ba60c626
Tony Arcieri
2022-12-30T02:13:51
pkcs7: add `ValueOrd` impls (#825) Followup from #813
diff --git a/pkcs7/src/cms_version.rs b/pkcs7/src/cms_version.rs index 574f6e17..9655bd0a 100644 --- a/pkcs7/src/cms_version.rs +++ b/pkcs7/src/cms_version.rs @@ -1,6 +1,7 @@ //! `CMSVersion` [RFC 5652 § 10.2.5](https://datatracker.ietf.org/doc/html/rfc5652#section-10.2.5) -use der::Enumerated; +use core::cmp::Order...
2
19
14
c581d140f5b9b68073324c406fba67f783829465
William Woodruff
2022-12-27T00:27:30
x509-cert: add `Display` impl for `SerialNumber` (#820)
diff --git a/x509-cert/src/serial_number.rs b/x509-cert/src/serial_number.rs index 0c46ee1c..c671f0ce 100644 --- a/x509-cert/src/serial_number.rs +++ b/x509-cert/src/serial_number.rs @@ -1,5 +1,7 @@ //! X.509 serial number +use core::fmt::Display; + use der::{ asn1::Uint, DecodeValue, EncodeValue, ErrorKind, F...
1
31
0
ca18786c10cac4a84646a10e70adec9deb52fe56
Patrick Uiterwijk
2022-12-26T21:09:51
x509-cert: allow request to be serialized to pem (#819)
diff --git a/x509-cert/src/request.rs b/x509-cert/src/request.rs index d198b3ff..ba0281be 100644 --- a/x509-cert/src/request.rs +++ b/x509-cert/src/request.rs @@ -11,6 +11,9 @@ use der::asn1::BitStringRef; use der::{Decode, Enumerated, Sequence}; use spki::{AlgorithmIdentifierRef, SubjectPublicKeyInfoRef}; +#[cfg(f...
1
9
0
325400465088c2cc9c88e9e38998a184df5a891c
William Woodruff
2022-12-23T17:41:31
asn1/octet_string: add `OctetStringRef::decode_into` (#817)
diff --git a/der/src/asn1/octet_string.rs b/der/src/asn1/octet_string.rs index 6f5b91a3..1bea0e68 100644 --- a/der/src/asn1/octet_string.rs +++ b/der/src/asn1/octet_string.rs @@ -1,8 +1,8 @@ //! ASN.1 `OCTET STRING` support. use crate::{ - asn1::AnyRef, ord::OrdIsValueOrd, ByteSlice, DecodeValue, EncodeValue, Er...
1
22
2
a8a0b0440b5fca5ef9848a1811468c1157110e96
Arthur Gautier
2022-12-18T05:03:54
x509-cert: SerialNumber is now a specialized object (#795) * der: Introduce `Uint` as an owned version of `UintRef` * x509-cert: SerialNumber is now a specialized object Co-authored-by: Arthur Gautier <superbaloo+registrations.github@superbaloo.net>
diff --git a/der/src/asn1.rs b/der/src/asn1.rs index 12fe46b4..4b1bcf52 100644 --- a/der/src/asn1.rs +++ b/der/src/asn1.rs @@ -47,7 +47,10 @@ pub use self::{ #[cfg(feature = "alloc")] #[cfg_attr(docsrs, doc(cfg(feature = "alloc")))] -pub use self::{any::Any, bit_string::BitString, octet_string::OctetString, set_of:...
12
249
18
f035160e5825fd1b69ff2c118d30ef2f234b4b0b
Tony Arcieri
2022-12-17T17:36:43
der: remove unused impls (#800) This is a vestige from when more decoding/encoding was handled by way of `AnyRef` instead of generics/traits.
diff --git a/der/src/asn1/boolean.rs b/der/src/asn1/boolean.rs index e0321812..3ee1a0da 100644 --- a/der/src/asn1/boolean.rs +++ b/der/src/asn1/boolean.rs @@ -1,8 +1,8 @@ //! ASN.1 `BOOLEAN` support. use crate::{ - asn1::AnyRef, ord::OrdIsValueOrd, ByteSlice, DecodeValue, EncodeValue, Error, ErrorKind, - Fixe...
3
2
31
b0292bb3e2fd4c1ad1187c72c7bd5866d0bf9d3f
Dmitry Baryshkov
2022-12-17T15:45:33
Make PSS/OAEP params use generic AlgorithmIdentifier (#799) Moves assert_algorithm_oid to generic impl: The assert_algorithm_oid() method doesn't depend on the actual AlgorithmIdentifier's Params type and thus can be a part of the generic AlgorithmIdentifier<Params> implementation rather than being specific to A...
diff --git a/pkcs1/src/params.rs b/pkcs1/src/params.rs index b2080893..237c6fe5 100644 --- a/pkcs1/src/params.rs +++ b/pkcs1/src/params.rs @@ -6,15 +6,12 @@ use der::{ asn1::ContextSpecificRef, Decode, DecodeValue, Encode, EncodeValue, FixedTag, Reader, Sequence, Tag, TagMode, TagNumber, Writer, }; -use spki...
3
34
53
01dd38cfbecba6e5a71f262742759002e04593fb
Arthur Gautier
2022-12-13T19:04:18
spki: make `SubjectPublicKeyInfo` own the public key (#790) Co-authored-by: Tony Arcieri <bascule@gmail.com>
diff --git a/pkcs1/src/traits.rs b/pkcs1/src/traits.rs index b9899564..96f403f5 100644 --- a/pkcs1/src/traits.rs +++ b/pkcs1/src/traits.rs @@ -16,7 +16,10 @@ use { }; #[cfg(feature = "pkcs8")] -use crate::{ALGORITHM_ID, ALGORITHM_OID}; +use { + crate::{ALGORITHM_ID, ALGORITHM_OID}, + der::asn1::BitStringRef, ...
11
114
70
ab9a84807f1a935cc5ced934a911d266cd824905
Arthur Gautier
2022-12-13T17:44:44
x509-cert: Serial numbers are formated as printable string (#794)
diff --git a/x509-cert/src/attr.rs b/x509-cert/src/attr.rs index 2b4336ad..f4ad84dd 100644 --- a/x509-cert/src/attr.rs +++ b/x509-cert/src/attr.rs @@ -1,7 +1,7 @@ //! Attribute-related definitions as defined in X.501 (and updated by RFC 5280). use alloc::vec::Vec; -use const_oid::db::rfc4519::{COUNTRY_NAME, DOMAIN_...
1
4
1
4e97ab38e0e3e5a352697aa035819345b3836643
Franziskus Kiefer
2022-12-12T11:02:44
tls_codec: use serde feature instead of serde_serialize (#792)
diff --git a/tls_codec/src/quic_vec.rs b/tls_codec/src/quic_vec.rs index f21f62f0..16a09e7d 100644 --- a/tls_codec/src/quic_vec.rs +++ b/tls_codec/src/quic_vec.rs @@ -13,7 +13,7 @@ //! up to 62-bit length values. use alloc::vec::Vec; -#[cfg(feature = "serde_serialize")] +#[cfg(feature = "serde")] use serde::{Deser...
2
7
7
51001d352fa2ae8d0eb4c11b1de38f86960a7553
Tony Arcieri
2022-12-11T23:47:54
x509-cert: bump `rstest` to v0.16 (#789) Now that we're on MSRV 1.60 it's compatible
diff --git a/Cargo.lock b/Cargo.lock index 5ef50947..5f999040 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -194,6 +194,101 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "futures"...
2
140
9
855f78735d9ff6d862e679ae9c7ef6af5a033c3b
Tony Arcieri
2022-12-11T16:09:10
spki: make `AlgorithmIdentifier` generic around `Params` (#769) Previously `AlgorithmIdentifier::parameters` were always `AnyRef`. This commit changes them to a generic parameter `Params`. An alias `AlgorithmIdentifierRef` provides a type identical to the original with `AnyRef` as its `parameters`, which is used ...
diff --git a/pkcs1/src/lib.rs b/pkcs1/src/lib.rs index 11e08d38..60715bd4 100644 --- a/pkcs1/src/lib.rs +++ b/pkcs1/src/lib.rs @@ -52,7 +52,7 @@ pub const ALGORITHM_OID: ObjectIdentifier = ObjectIdentifier::new_unwrap("1.2.84 /// `AlgorithmIdentifier` for RSA. #[cfg(feature = "pkcs8")] #[cfg_attr(docsrs, doc(cfg(fea...
20
138
118
09dfa0b6ad70dee0b4b9c90a659a4ca7c9a2e7c0
Tony Arcieri
2022-12-11T14:48:00
der: rename `UIntRef` => `UintRef` (#786) From https://rust-lang.github.io/api-guidelines/naming.html > In UpperCamelCase, acronyms and contractions of compound words count > as one word: use Uuid rather than UUID, Usize rather than USize or > Stdin rather than StdIn. Based on the `Usize` example, it's pretty ...
diff --git a/der/src/asn1.rs b/der/src/asn1.rs index 34d692b6..12fe46b4 100644 --- a/der/src/asn1.rs +++ b/der/src/asn1.rs @@ -32,7 +32,7 @@ pub use self::{ context_specific::{ContextSpecific, ContextSpecificRef}, generalized_time::GeneralizedTime, ia5_string::Ia5StringRef, - integer::bigint::UIntRef,...
15
61
61
06ff4ecf02314f14f52f5adca65ec19f80bcab51
Tony Arcieri
2022-12-11T14:47:50
pkcs8+spki: use blanket impls for `Decode*` traits (#785) Previously these traits had `TryFrom` bounds for e.g. `PrivateKeyInfo`, which limits the applicability of these traits. This commit changes to using blanket impls for `TryFrom`, which allows types to handle parsing raw DER on their own, as in the `ring-com...
diff --git a/pkcs1/src/traits.rs b/pkcs1/src/traits.rs index c70820cb..b9899564 100644 --- a/pkcs1/src/traits.rs +++ b/pkcs1/src/traits.rs @@ -169,7 +169,10 @@ pub trait EncodeRsaPublicKey { #[cfg(feature = "pkcs8")] #[cfg_attr(docsrs, doc(cfg(feature = "pkcs8")))] -impl<T: pkcs8::DecodePrivateKey> DecodeRsaPrivate...
6
34
25
28f5e0c8feb7d1352190e26c38fb2acda99043cc
Tony Arcieri
2022-12-11T04:55:22
const-oid: generic backing buffer (#757) The current buffering approach, with a fixed-sized `ArrayVec`-like backing buffer, is helpful for being able to use `const fn` to be able to parse OID strings at compile time and re-encode them in BER form. This functionality is preserved as a new `Buffer` type, which still ...
diff --git a/const-oid/src/arcs.rs b/const-oid/src/arcs.rs index 7bf7a9a1..f4366dcc 100644 --- a/const-oid/src/arcs.rs +++ b/const-oid/src/arcs.rs @@ -1,8 +1,11 @@ //! Arcs are integer values which exist within an OID's hierarchy. -use crate::{Error, ObjectIdentifier, Result}; +use crate::{Error, Result}; use core:...
5
130
68
f0238a14a3147ee87a95aa4a950d90c6731a87a3
Tony Arcieri
2022-12-11T04:07:54
Bump versions to prereleases (#784) Begins the next cycle of breaking changes for all `const-oid`/`der`-dependent crates in this repository: - `const-oid` v0.10.0-pre - `der`/`der_derive` v0.7.0-pre - `pkcs1` v0.5.0-pre - `pkcs5` v0.6.0-pre - `pkcs8` v0.10.0-pre - `sec1` v0.4.0-pre - `spki` v0.7.0-pre - `x5...
diff --git a/Cargo.lock b/Cargo.lock index 4011e32f..e67c7b3a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -218,7 +218,7 @@ dependencies = [ [[package]] name = "const-oid" -version = "0.9.1" +version = "0.10.0-pre" dependencies = [ "hex-literal", ] @@ -325,7 +325,7 @@ dependencies = [ [[package]] name = "der...
12
41
41
d64bd5fd576da4bff5117904b5360ab27755dbf0
Tony Arcieri
2022-12-06T03:14:55
der_derive: use `InputType` enum for `ValueOrd` derive (#780) Replaces `bool` flag with an `enum` which makes the code more readable
diff --git a/der/derive/src/value_ord.rs b/der/derive/src/value_ord.rs index f385058f..97e37cae 100644 --- a/der/derive/src/value_ord.rs +++ b/der/derive/src/value_ord.rs @@ -22,7 +22,8 @@ pub(crate) struct DeriveValueOrd { /// Fields of structs or enum variants. fields: Vec<ValueField>, - is_enum: bool,...
1
32
18
f1f48f1a71caf13e240d632407141c8bbe3d07b9
Arthur Gautier
2022-11-28T18:16:42
der: missing ValueOrd for `OctetString` (#772)
diff --git a/der/src/asn1/octet_string.rs b/der/src/asn1/octet_string.rs index 9f78c960..6f5b91a3 100644 --- a/der/src/asn1/octet_string.rs +++ b/der/src/asn1/octet_string.rs @@ -177,3 +177,6 @@ impl<'a> From<&'a OctetString> for OctetStringRef<'a> { OctetStringRef::new(&octet_string.inner).expect("invalid OCT...
1
3
0
be9e7cab06d5ad31136332ce2257e1d7fc2a8b45
Robin Lambertz
2022-11-26T19:52:12
Implement `ValueOrd` in more places (#723) Implements `ValueOrd` for the following: - `FlagSet<T>` - `UIntRef` - x509-cert `Version` Allows deriving `ValueOrd` on `Choice` enums. Derives `ValueOrd` for a bunch of structs.
diff --git a/der/derive/src/value_ord.rs b/der/derive/src/value_ord.rs index 6b08f7ff..f385058f 100644 --- a/der/derive/src/value_ord.rs +++ b/der/derive/src/value_ord.rs @@ -21,6 +21,8 @@ pub(crate) struct DeriveValueOrd { /// Fields of structs or enum variants. fields: Vec<ValueField>, + + is_enum: boo...
17
135
67
2deb3a487b9dacfe0abdd51c7ece90a2b45cbf02
Arthur Gautier
2022-11-26T19:49:44
x509-cert: crl fixup comment (#767)
diff --git a/x509-cert/src/crl.rs b/x509-cert/src/crl.rs index 3e630435..6020bd4d 100644 --- a/x509-cert/src/crl.rs +++ b/x509-cert/src/crl.rs @@ -13,7 +13,7 @@ use spki::AlgorithmIdentifier; /// `CertificateList` as defined in [RFC 5280 Section 5.1]. /// -///```text +/// ```text /// CertificateList ::= SEQUENCE...
1
2
2
78bbb7406fca6cdd2d708c6f6c9b356d8942ea52
Arthur Gautier
2022-11-19T14:19:21
x509-cert: allow certificate to be serialized to pem (#763)
diff --git a/x509-cert/src/certificate.rs b/x509-cert/src/certificate.rs index cca7f839..3083d7bf 100644 --- a/x509-cert/src/certificate.rs +++ b/x509-cert/src/certificate.rs @@ -9,6 +9,9 @@ use der::asn1::{BitStringRef, UIntRef}; use der::{Decode, Enumerated, Error, ErrorKind, Sequence}; use spki::{AlgorithmIdentifi...
1
9
0
86fee0cb811cb1bea1a2fe0abb3f5085747c21d1
Arthur Gautier
2022-11-18T05:05:30
x509-cert: fixup repository url (#762)
diff --git a/x509-cert/Cargo.toml b/x509-cert/Cargo.toml index 5d622010..6241faf7 100644 --- a/x509-cert/Cargo.toml +++ b/x509-cert/Cargo.toml @@ -7,7 +7,7 @@ format as described in RFC 5280 """ authors = ["RustCrypto Developers"] license = "Apache-2.0 OR MIT" -repository = "https://github.com/RustCrypto/formats/tre...
1
1
1
32b87fa8a1d779504e0460d4e9fa6b73c8bf33cc
Tom Leavy
2022-11-15T02:50:49
x509: `countryName` should always be `PrintableString` (#760) Also changes `DomainComponent` to be represented as `Ia5String`
diff --git a/x509-cert/src/attr.rs b/x509-cert/src/attr.rs index 3d32c251..2b4336ad 100644 --- a/x509-cert/src/attr.rs +++ b/x509-cert/src/attr.rs @@ -1,6 +1,7 @@ //! Attribute-related definitions as defined in X.501 (and updated by RFC 5280). use alloc::vec::Vec; +use const_oid::db::rfc4519::{COUNTRY_NAME, DOMAIN_...
2
18
11
cbcddd200816d4c72fd1cbeef62a1f4a76e0a096
Tony Arcieri
2022-11-12T23:36:49
const-oid: add `DynAssociatedOid` trait (#758) Adds an object safe value-dependent trait which returns an `ObjectIdentifier` dynamically, with a blanket impl for types which impl `AssociatedOid`.
diff --git a/const-oid/src/lib.rs b/const-oid/src/lib.rs index 565cbda4..b00d4e2e 100644 --- a/const-oid/src/lib.rs +++ b/const-oid/src/lib.rs @@ -46,6 +46,22 @@ pub trait AssociatedOid { const OID: ObjectIdentifier; } +/// A trait which associates a dynamic, `&self`-dependent OID with a type, +/// which may ch...
1
16
0
d7dcef14a22e8d72426c30ffe8780704c1a90657
Franziskus Kiefer
2022-10-31T13:04:53
tls_codec: fix empty variable-length vectors and add MLS limit (#751) * fix empty variable-length vectors * add MLS limit This change fixes a bug where empty variable-length encoded vectors lead to an endless loop because. It also introduces an `mls` feature flag that limits the length of variable-length encode...
diff --git a/tls_codec/Cargo.toml b/tls_codec/Cargo.toml index df130bc7..fed422bc 100644 --- a/tls_codec/Cargo.toml +++ b/tls_codec/Cargo.toml @@ -25,6 +25,7 @@ regex = "1.6" default = [ "std" ] derive = [ "std", "tls_codec_derive" ] serde_serialize = [ "std", "serde" ] +mls = [] # In MLS variable length vectors are...
3
29
13
d1c65d17aae96e1a5e1f0586f728d624872a822c
Franziskus Kiefer
2022-10-28T10:02:08
tls_codec: Add push/pop functions and Into<Vec<u8>> to VLBytes (#750)
diff --git a/tls_codec/src/quic_vec.rs b/tls_codec/src/quic_vec.rs index 9b451190..9c6a814e 100644 --- a/tls_codec/src/quic_vec.rs +++ b/tls_codec/src/quic_vec.rs @@ -200,6 +200,18 @@ impl VLBytes { pub fn as_slice(&self) -> &[u8] { self.vec.as_ref() } + + /// Add an element to this. + #[inline...
1
18
0
30731ab4cf4bad660de3f7694a19c2003432fd0c
Tobias Florek
2022-10-18T14:37:13
Add sha2-style base64 crypt format (#742) This format is also known as Hash64 by python's passlib. It is used e.g. by the `crypt(3)` schemes sha1_crypt, sha256_crypt, sha512_crypt and md5_crypt, but notably not `des_crypt`. It is a little endian encoding.
diff --git a/base64ct/src/alphabet.rs b/base64ct/src/alphabet.rs index d70c5612..d888e72e 100644 --- a/base64ct/src/alphabet.rs +++ b/base64ct/src/alphabet.rs @@ -7,6 +7,7 @@ use core::{fmt::Debug, ops::RangeInclusive}; pub mod bcrypt; pub mod crypt; +pub mod shacrypt; pub mod standard; pub mod url; diff --git ...
4
165
0
4e1254e045cbe26dbfd6c5cb03d17a063ab0732f
Franziskus Kiefer
2022-10-14T18:21:44
remove debug asserts from quic vec when fuzzing (#741)
diff --git a/tls_codec/src/lib.rs b/tls_codec/src/lib.rs index ce5a183a..57435c81 100644 --- a/tls_codec/src/lib.rs +++ b/tls_codec/src/lib.rs @@ -51,7 +51,7 @@ pub use quic_vec::{VLByteSlice, VLBytes}; pub use tls_codec_derive::{TlsDeserialize, TlsSerialize, TlsSize}; /// Errors that are thrown by this crate. -#[d...
3
81
36
4c278c8973727ae2c315181867f60a727fabce04
Noah Golub
2022-10-14T09:51:26
Derive Ord and PartialOrd for VLBytes (#740) Signed-off-by: nomaxg <noahgolub2@gmail.com>
diff --git a/tls_codec/src/quic_vec.rs b/tls_codec/src/quic_vec.rs index cf6ea2c3..c8b60fd1 100644 --- a/tls_codec/src/quic_vec.rs +++ b/tls_codec/src/quic_vec.rs @@ -167,7 +167,7 @@ impl<T: Size> Size for &[T] { /// Use this struct if bytes are encoded. /// This is faster than the generic version. #[cfg_attr(featur...
1
1
1
04f2f01d0238630d4a4ff6a8f93c8202c610b55d
Franziskus Kiefer
2022-10-12T12:28:03
Implement more traits for VLBytes (#737) - optionally impl serde (de)serialization for VLBytes (serde_serialize feature) - implement AsRef, Hash, From<Vec<u8>>, From<&[u8]> for VLBytes
diff --git a/tls_codec/src/quic_vec.rs b/tls_codec/src/quic_vec.rs index f056212a..cf6ea2c3 100644 --- a/tls_codec/src/quic_vec.rs +++ b/tls_codec/src/quic_vec.rs @@ -9,6 +9,9 @@ use alloc::vec::Vec; +#[cfg(feature = "serde_serialize")] +use serde::{Deserialize as SerdeDeserialize, Serialize as SerdeSerialize}; + ...
1
25
1
85160c364e3f29f7ce914797206dcbb3df830c91
Dmitry Baryshkov
2022-10-10T22:07:03
pkcs1: implement support for OAEP Params structure (#733) Add support for parsing and generating RSA OAEP params. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
diff --git a/pkcs1/src/lib.rs b/pkcs1/src/lib.rs index 92b7813c..84dc6ab4 100644 --- a/pkcs1/src/lib.rs +++ b/pkcs1/src/lib.rs @@ -27,7 +27,7 @@ pub use der::{ pub use crate::{ error::{Error, Result}, - params::{RsaPssParams, TrailerField}, + params::{RsaOaepParams, RsaPssParams, TrailerField}, priva...
3
209
4
b08c82ac44c3d0b84b49669363a14953cc240533
Artyom Pavlov
2022-09-23T12:43:05
Update Cargo.lock (#728)
diff --git a/Cargo.lock b/Cargo.lock index 8aebc271..8bef04a0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -13,6 +13,15 @@ dependencies = [ "cpufeatures", ] +[[package]] +name = "aho-corasick" +version = "0.7.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4f55bd91a0978cbfd91c457...
2
99
81
4e720c36926e7a8dcac3e4ae88056c095a8ef85a
Dirk Stolle
2022-09-22T18:28:23
chore: fix a few typos (#727)
diff --git a/const-oid/src/arcs.rs b/const-oid/src/arcs.rs index e0281146..7bf7a9a1 100644 --- a/const-oid/src/arcs.rs +++ b/const-oid/src/arcs.rs @@ -152,7 +152,7 @@ impl RootArcs { impl TryFrom<u8> for RootArcs { type Error = Error; - // Ensured not to oerflow by constructor invariants + // Ensured not ...
7
7
7
3d2cf949c362d077c2ae210cfd401eced7e86a76
Tony Arcieri
2022-08-29T18:09:05
x509-cert: note why `rstest` can't easily be upgraded (#715) - `rstest` v0.13 requires MSRV 1.59 for `async-global-executor` - `rstest` v0.14 and above use namespaced cargo features which require MSRV 1.60. On earlier versions of rustc (for crates anywhere in the same workspace) this causes a confusing failure mode...
diff --git a/x509-cert/Cargo.toml b/x509-cert/Cargo.toml index 662867fc..5d622010 100644 --- a/x509-cert/Cargo.toml +++ b/x509-cert/Cargo.toml @@ -22,7 +22,11 @@ spki = { version = "0.6", path = "../spki" } [dev-dependencies] hex-literal = "0.3" -rstest = "0.12.0" + +# NOTE: upgrading requires MSRV bumps +# - rstes...
1
5
1
3c05bab7628373e3c464c1373a7eaf6700bca86a
Tony Arcieri
2022-08-28T19:58:08
base32ct+base64ct: use `RangeInclusive` for `DecodeStep` (#713) This is semantically more correct and avoids triggering the `almost_complete_letter_range` clippy lint. Note that there was no bug here as the same range is still used behind the scenes.
diff --git a/base32ct/src/alphabet.rs b/base32ct/src/alphabet.rs index 631a3e14..5f961052 100644 --- a/base32ct/src/alphabet.rs +++ b/base32ct/src/alphabet.rs @@ -2,7 +2,7 @@ pub(crate) mod rfc4648; -use core::{fmt::Debug, ops::Range}; +use core::{fmt::Debug, ops::RangeInclusive}; /// Core encoder/decoder funct...
7
23
23
64d2ed6cf534eabae378933ca515daff93f1ec0f
Tony Arcieri
2022-08-28T18:20:06
pkcs1: cleanups to `params` module (#708) Followup to #698. - Renames `RsaPSSParameters` => `RsaPssParams` - Removes use of the `der` crate's `derive` feature The `rsa` crate curently doesn't need any custom derive, and adding it here would make it a hard requirement. We can consider switching to custom der...
diff --git a/pkcs1/Cargo.toml b/pkcs1/Cargo.toml index 1e1d567d..ee180ccb 100644 --- a/pkcs1/Cargo.toml +++ b/pkcs1/Cargo.toml @@ -15,7 +15,7 @@ edition = "2021" rust-version = "1.57" [dependencies] -der = { version = "0.6", features = ["oid", "derive"], path = "../der" } +der = { version = "0.6", features = ["oid"...
4
139
54
d413ca71c5bd3b69634149271731406197db8f46
Dmitry Baryshkov
2022-08-28T16:14:12
pkcs1: implement support for PSS Params structure (#698) Add support for parsing and generatign RSA PSS params. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
diff --git a/Cargo.lock b/Cargo.lock index db0626bf..2e0cdf3a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -879,9 +879,11 @@ dependencies = [ name = "pkcs1" version = "0.4.0" dependencies = [ + "const-oid 0.9.0", "der 0.6.0", "hex-literal", "pkcs8 0.9.0", + "spki 0.6.0", "tempfile", "zeroize", ] diff --git...
5
196
1
8cf5e45cad9ec19601194b1f3587b465f0252c66
Nicholas Bishop
2022-08-28T16:00:41
der: fix some doc links (#702)
diff --git a/der/src/lib.rs b/der/src/lib.rs index 7038729d..413b2e4a 100644 --- a/der/src/lib.rs +++ b/der/src/lib.rs @@ -310,17 +310,17 @@ //! [A Layman's Guide to a Subset of ASN.1, BER, and DER]: https://luca.ntop.org/Teaching/Appunti/asn1.html //! [A Warm Welcome to ASN.1 and DER]: https://letsencrypt.org/docs/a...
1
3
3
60b5dd9b9afefcdf7095a0339cfead5ace0c0728
Nicholas Bishop
2022-08-28T16:00:07
pkcs7: fix duplicate readme inclusion (#703)
diff --git a/pkcs7/src/lib.rs b/pkcs7/src/lib.rs index 6cf8d493..f1710574 100644 --- a/pkcs7/src/lib.rs +++ b/pkcs7/src/lib.rs @@ -1,7 +1,6 @@ #![no_std] #![cfg_attr(docsrs, feature(doc_cfg))] #![doc = include_str!("../README.md")] -#![doc = include_str!("../README.md")] #![doc( html_logo_url = "https://raw.gi...
1
0
1
21c29375c84201a1d80d6a19ecc91a517e72c443
Tom Leavy
2022-08-26T15:03:25
x509-cert: Re-export spki (#701)
diff --git a/x509-cert/src/lib.rs b/x509-cert/src/lib.rs index b550d722..ea071837 100644 --- a/x509-cert/src/lib.rs +++ b/x509-cert/src/lib.rs @@ -32,3 +32,4 @@ pub mod time; pub use certificate::{Certificate, PkiPath, TbsCertificate, Version}; pub use der; +pub use spki;
1
1
0
16802ea8766b465691e14ccc43d705e838496b0b
Artyom Pavlov
2022-08-23T20:47:12
Remove html_root_url (#706)
diff --git a/base16ct/Cargo.toml b/base16ct/Cargo.toml index 726e4708..28a0ba9d 100644 --- a/base16ct/Cargo.toml +++ b/base16ct/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "base16ct" -version = "0.1.1" # Also update html_root_url in lib.rs when bumping this +version = "0.1.1" description = """ Pure Rust implementat...
22
38
40
f7f83e8370278951fc4fd67c3bd289a2e2db369a
Dmitry Baryshkov
2022-08-04T16:14:16
der/asn1: remove bolerplate code by using Deref (#693) (#697) Use Deref<StrSlice> to limit amount of boilerplace code in the *StringRef implementations. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
diff --git a/der/src/asn1/ia5_string.rs b/der/src/asn1/ia5_string.rs index c1dbfaa8..3971270a 100644 --- a/der/src/asn1/ia5_string.rs +++ b/der/src/asn1/ia5_string.rs @@ -4,7 +4,7 @@ use crate::{ asn1::AnyRef, ord::OrdIsValueOrd, ByteSlice, DecodeValue, EncodeValue, Error, FixedTag, Header, Length, Reader, Re...
6
31
115
b289ef6a40bd9c8927d78c4e8dabe3af78a4aa6d
Dmitry Baryshkov
2022-07-30T00:06:49
x509-cert: support `TeletexString` (#692) * Support TeletexStrings in RDN Handle the TeletexStrings usage for the value part of AttributeTypeAndValue. * Support TeletexStrings in DirectoryString Handle the TeletexStrings usage in the DirectoryString structure. Signed-off-by: Dmitry Baryshkov <dmitry.barys...
diff --git a/x509-cert/src/attr.rs b/x509-cert/src/attr.rs index 9a0d2d26..3d32c251 100644 --- a/x509-cert/src/attr.rs +++ b/x509-cert/src/attr.rs @@ -220,6 +220,7 @@ impl fmt::Display for AttributeTypeAndValue<'_> { Tag::PrintableString => self.value.printable_string().ok().map(|s| s.as_str()), ...
2
5
1
44c5f15a996fcc88e406d5c1756db4871761694e
Dmitry Baryshkov
2022-07-29T22:20:50
der: Rudimentary implementation of TeletexString and VideotexString (#691) Add rudimentary TeletexString and VideotexString support. For the practical purposes they are treated as IA5String, disallowing (for now) characters from the non-ASCII space. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
diff --git a/der/derive/src/asn1_type.rs b/der/derive/src/asn1_type.rs index 787e054a..cd21614a 100644 --- a/der/derive/src/asn1_type.rs +++ b/der/derive/src/asn1_type.rs @@ -23,6 +23,12 @@ pub(crate) enum Asn1Type { /// ASN.1 `PrintableString`. PrintableString, + /// ASN.1 `TeletexString`. + TeletexS...
9
397
7
89a9ba7f1998df53985543adc43b2a500a772f9f
Tony Arcieri
2022-06-27T01:32:25
base64ct: fix last block validation (#680) Generalizes the internal `validate_padding` function into a `validate_last_block` function which can work on unpadded variants as well. The function performs round-trip re-encoding the decoded last block, ensuring that it matches the provided input, or otherwise returns...
diff --git a/base64ct/src/encoding.rs b/base64ct/src/encoding.rs index 273e32ce..36f37e17 100644 --- a/base64ct/src/encoding.rs +++ b/base64ct/src/encoding.rs @@ -96,7 +96,7 @@ impl<T: Alphabet> Encoding for T { dst_rem.copy_from_slice(&tmp_out[..dst_rem.len()]); if err == 0 { - validate_...
2
33
23
afddbbc26e8711ef236aa57a79ff7f9ddcb0ea3a
Tony Arcieri
2022-05-30T16:04:18
base32ct: extract `Alphabet` trait (#668) Extracts a sealed trait which is used to hide the implementation details for particular encodings, similar to the `Variant` trait in the `base64ct` crate.
diff --git a/base32ct/src/alphabet.rs b/base32ct/src/alphabet.rs new file mode 100644 index 00000000..8eace325 --- /dev/null +++ b/base32ct/src/alphabet.rs @@ -0,0 +1,20 @@ +//! Base32 alphabets. + +pub(crate) mod base32; +pub(crate) mod base32upper; + +use core::fmt::Debug; + +/// Core encoder/decoder functions for a ...
8
281
237
bab1e2d924fa3532c104f7d3dac6a254cb4e31c2
Tony Arcieri
2022-05-30T14:48:26
base32ct: add `Base32Upper` (#667) Support for decoding/encoding upper case Base32.
diff --git a/base32ct/src/lib.rs b/base32ct/src/lib.rs index e2e157ce..417f77fb 100644 --- a/base32ct/src/lib.rs +++ b/base32ct/src/lib.rs @@ -54,7 +54,7 @@ pub use crate::{ error::{Error, Result}, }; -/// Standard Base32 encoding with `=` padding. +/// RFC4648 lower case Base32 encoding with `=` padding. #[de...
1
81
14
29ec7f7c005920edc4d1407ec12833e233f7f48b
Carl Wallace
2022-05-21T17:34:08
export newtype macro (#664) Co-authored-by: Carl Wallace <crwallace1970@gmail.com>
diff --git a/x509-cert/src/macros.rs b/x509-cert/src/macros.rs index 2b7508ff..3256c242 100644 --- a/x509-cert/src/macros.rs +++ b/x509-cert/src/macros.rs @@ -1,5 +1,14 @@ //! Macros used by this crate +/// Implements the following traits for a newtype of a `der` decodable/encodable type: +/// +/// - `From` conversi...
1
9
0
60b017662053c09fc5335993e903676085314944
Tony Arcieri
2022-05-09T23:29:17
pkcs8: document `alloc` and `pkcs5` features for re-exports (#662) Adds `doc_cfg` for the features needed for the re-exports to be available
diff --git a/pkcs8/src/lib.rs b/pkcs8/src/lib.rs index 1d2dfa28..1b4879e6 100644 --- a/pkcs8/src/lib.rs +++ b/pkcs8/src/lib.rs @@ -87,6 +87,7 @@ pub use der::{self, asn1::ObjectIdentifier, oid::AssociatedOid}; pub use spki::{self, AlgorithmIdentifier, DecodePublicKey, SubjectPublicKeyInfo}; #[cfg(feature = "alloc")...
1
2
0
708ce24bfdc0cc391888b78b2823c250e4443a7c
Tony Arcieri
2022-05-09T00:58:06
x509-ocsp: fix invalid `x.509` keyword in Cargo.toml The `.` character is disallowed in keywords
diff --git a/x509-ocsp/Cargo.toml b/x509-ocsp/Cargo.toml index c351fbc2..0ad3f67d 100644 --- a/x509-ocsp/Cargo.toml +++ b/x509-ocsp/Cargo.toml @@ -9,7 +9,7 @@ authors = ["RustCrypto Developers"] license = "Apache-2.0 OR MIT" repository = "https://github.com/RustCrypto/formats/tree/master/x509-ocsp" categories = ["cr...
1
1
1
433a532eb08b23c1590ae24294db41470e343ee8
Tony Arcieri
2022-05-09T00:57:30
Cut prereleases with `der` v0.6 dependency (#659) The following are the remaining crates which haven't yet received a final release with `der` v0.6, with this commit cutting the following prereleases: - `pkcs7` v0.4.0-pre.0 - `x509-cert` v0.1.0-pre.0 - `x509-ocsp` v0.1.0-pre.0 The idea is to give one last op...
diff --git a/Cargo.lock b/Cargo.lock index a41b3e7b..e966f968 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -887,7 +887,7 @@ dependencies = [ [[package]] name = "pkcs7" -version = "0.4.0-pre" +version = "0.4.0-pre.0" dependencies = [ "der 0.6.0", "hex-literal", @@ -1701,7 +1701,7 @@ checksum = "712e227841d057c1e...
4
7
9
911bfc4e36352f0b559ad63abcc740f99646a9c6
Tony Arcieri
2022-05-08T14:07:29
der: variable name fixup
diff --git a/der/src/encode.rs b/der/src/encode.rs index 4db2c342..51fc13d8 100644 --- a/der/src/encode.rs +++ b/der/src/encode.rs @@ -43,9 +43,9 @@ pub trait Encode { buf.reserve(expected_len); buf.extend(iter::repeat(0).take(expected_len)); - let mut encoder = SliceWriter::new(buf); - ...
1
3
3
2d43fe8d20c352dd6a952622524d7343152b98b0
Tony Arcieri
2022-05-08T14:03:50
der: rename `SliceReader`/`SliceWriter` (#651) Renames the following types: - `Decoder` => `SliceReader` - `Encoder` => `SliceWriter`
diff --git a/der/src/asn1/any.rs b/der/src/asn1/any.rs index 865dc786..717d666b 100644 --- a/der/src/asn1/any.rs +++ b/der/src/asn1/any.rs @@ -1,8 +1,8 @@ //! ASN.1 `ANY` type. use crate::{ - asn1::*, ByteSlice, Choice, Decode, DecodeValue, Decoder, DerOrd, EncodeValue, Error, - ErrorKind, FixedTag, Header, L...
21
119
135
c428ebad348c012089aa0845c9502ec220515602
Tony Arcieri
2022-05-07T23:06:12
sec1 v0.3.0-pre.4 (#650)
diff --git a/Cargo.lock b/Cargo.lock index d23041fd..0b82b062 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1256,7 +1256,7 @@ dependencies = [ [[package]] name = "sec1" -version = "0.3.0-pre.3" +version = "0.3.0-pre.4" dependencies = [ "base16ct 0.1.1", "der 0.6.0-pre.4", diff --git a/der/Cargo.toml b/der/Cargo...
3
3
3
64ea1faaf26cd09c8981e25b16e508d4ab0ab5c8
Tony Arcieri
2022-05-07T21:30:16
sec1: use `base16ct` and `serdect` crates (#648) Uses these crates to impl hex encoding/decoding and serde support
diff --git a/Cargo.lock b/Cargo.lock index 1fd1cb33..d23041fd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1258,11 +1258,12 @@ dependencies = [ name = "sec1" version = "0.3.0-pre.3" dependencies = [ + "base16ct 0.1.1", "der 0.6.0-pre.4", "generic-array", "hex-literal", "pkcs8 0.9.0-pre.3", - "serde", + "serd...
5
23
85
f0f245790af13b3f8c0959a65979cc94d5bbd63c
Tony Arcieri
2022-05-07T13:24:46
sec1 v0.3.0-pre.3 (#647)
diff --git a/Cargo.lock b/Cargo.lock index f18e3911..18787e99 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1256,7 +1256,7 @@ dependencies = [ [[package]] name = "sec1" -version = "0.3.0-pre.2" +version = "0.3.0-pre.3" dependencies = [ "der 0.6.0-pre.4", "generic-array", diff --git a/sec1/Cargo.toml b/sec1/Carg...
2
2
2
5a9f47f55fd23d149a21146e3b2c94ec4cf7be1f
Tony Arcieri
2022-05-06T23:56:26
pkcs8 0.9.0-pre.3 (#646)
diff --git a/Cargo.lock b/Cargo.lock index baa4106f..f18e3911 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -863,7 +863,7 @@ version = "0.4.0-pre.2" dependencies = [ "der 0.6.0-pre.4", "hex-literal", - "pkcs8 0.9.0-pre.2", + "pkcs8 0.9.0-pre.3", "tempfile", "zeroize", ] @@ -907,7 +907,7 @@ dependencies = [ [...
4
6
6
17742f71bc531abcd7e7f0f2a24530de13da67cd
Tony Arcieri
2022-05-06T23:04:08
pkcs8: re-export `AssociatedOid` (#645) This trait can be used to associate an OID with a particular type
diff --git a/pkcs8/src/lib.rs b/pkcs8/src/lib.rs index 01ecbb6d..1d2dfa28 100644 --- a/pkcs8/src/lib.rs +++ b/pkcs8/src/lib.rs @@ -83,7 +83,7 @@ pub use crate::{ traits::DecodePrivateKey, version::Version, }; -pub use der::{self, asn1::ObjectIdentifier}; +pub use der::{self, asn1::ObjectIdentifier, oid::Asso...
1
1
1
12493ca8f363122e6ceb87356d52a402eca160c8
Tony Arcieri
2022-05-06T19:58:33
der: add `Reader::sequence` (#644) Adds a trait-based replacement for `Decoder::sequence` built on `Reader::read_nested` and `NestedReader`.
diff --git a/der/src/reader.rs b/der/src/reader.rs index 23ac5f19..1d6fcf80 100644 --- a/der/src/reader.rs +++ b/der/src/reader.rs @@ -148,6 +148,17 @@ pub trait Reader<'r>: Sized { self.input_len().saturating_sub(self.position()) } + /// Read an ASN.1 `SEQUENCE`, creating a nested [`Reader`] for the...
1
11
0
4ed01b8438d60e79ef108c3683de8bce39491558
Tony Arcieri
2022-05-05T23:23:06
pkcs1/5/8 and sec1 pre.2 releases (#643) Releases the following pre.2 versions: - `pkcs1` v0.4.0-pre.2 - `pkcs5` v0.5.0-pre.2 - `pkcs8` v0.9.0-pre.2 - `sec1` v0.3.0-pre.2
diff --git a/Cargo.lock b/Cargo.lock index 7e578f66..baa4106f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -859,18 +859,18 @@ dependencies = [ [[package]] name = "pkcs1" -version = "0.4.0-pre" +version = "0.4.0-pre.2" dependencies = [ "der 0.6.0-pre.4", "hex-literal", - "pkcs8 0.9.0-pre.1", + "pkcs8 0.9.0-pre.2...
5
13
13
a6a106c574b7a2dad6df3909766d8cb03f85030c
Tony Arcieri
2022-05-05T22:43:40
spki v0.6.0-pre.3 (#642)
diff --git a/Cargo.lock b/Cargo.lock index 502fba5d..7e578f66 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -882,7 +882,7 @@ dependencies = [ "scrypt", "sha1", "sha2 0.10.2", - "spki 0.6.0-pre.2", + "spki 0.6.0-pre.3", ] [[package]] @@ -891,7 +891,7 @@ version = "0.4.0-pre" dependencies = [ "der 0.6.0-pre.4"...
6
10
10
ed5f12a567d3e322122634f7953c0ea48360c77c
Tony Arcieri
2022-05-05T20:41:16
der v0.6.0-pre.4 (#641) Also includes a release bump for `der_derive` v0.6.0-pre.4
diff --git a/Cargo.lock b/Cargo.lock index 9c97a463..502fba5d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -425,7 +425,7 @@ dependencies = [ [[package]] name = "der" -version = "0.6.0-pre.3" +version = "0.6.0-pre.4" dependencies = [ "const-oid 0.9.0", "der_derive", @@ -439,7 +439,7 @@ dependencies = [ [[pack...
10
19
19
db355782f59367f975672bd345297edd697d3121
Tony Arcieri
2022-05-05T18:37:07
der: add owned `Any` and `OctetString` types (#640) Adds owned forms of these two ASN.1 types, now that the borrowed forms have been renamed to `AnyRef` and `OctetStringRef`. Includes some refactoring of the owned `BitString` type. Also adds a `Reader::read_vec` method for reading a byte vector from a reader, ...
diff --git a/der/src/asn1.rs b/der/src/asn1.rs index 54120bb9..0f7290c1 100644 --- a/der/src/asn1.rs +++ b/der/src/asn1.rs @@ -43,7 +43,7 @@ pub use self::{ #[cfg(feature = "alloc")] #[cfg_attr(docsrs, doc(cfg(feature = "alloc")))] -pub use self::{bit_string::BitString, set_of::SetOfVec}; +pub use self::{any::Any, ...
7
333
106
c16e61f6797c959de6cefacbaf8f4f5b420fffb1
Tony Arcieri
2022-05-05T15:45:14
der: use `::read_into` internally in time types (#638) Allows decoding `GeneralizedTime` and `UtcTime` from e.g. PEM
diff --git a/der/src/asn1/generalized_time.rs b/der/src/asn1/generalized_time.rs index 98d0d6eb..c7a35545 100644 --- a/der/src/asn1/generalized_time.rs +++ b/der/src/asn1/generalized_time.rs @@ -4,8 +4,8 @@ use crate::{ asn1::AnyRef, datetime::{self, DateTime}, ord::OrdIsValueOrd, - ByteSlice, DecodeV...
2
24
10
f4e8517a096c9512ed896b5cd03e895450e1d564
Tony Arcieri
2022-05-04T19:59:05
der: move `PemWriter` to its own module (#635) Internal refactor in preparation for adding `PemReader`.
diff --git a/der/src/lib.rs b/der/src/lib.rs index 2f2819e2..4794d4ee 100644 --- a/der/src/lib.rs +++ b/der/src/lib.rs @@ -396,7 +396,7 @@ pub use const_oid as oid; #[cfg(feature = "pem")] #[cfg_attr(docsrs, doc(cfg(feature = "pem")))] pub use { - crate::{decode::DecodePem, encode::EncodePem, writer::PemWriter}, ...
3
46
46
5d59be83168e9c707f841fe405860d40e533de87
Tony Arcieri
2022-05-02T16:30:25
ssh-key: add more key conversions (#629) Adds support for converting the various algorithm-specific key types (e.g. `RsaPublicKey`, `RsaPrivateKey`) directly into `PublicKey` and `PrivateKey` using the `From` trait. Unlike `private::KeypairData`, these conversions can be infallible.
diff --git a/ssh-key/src/private.rs b/ssh-key/src/private.rs index 98b07e5f..2dd6bb09 100644 --- a/ssh-key/src/private.rs +++ b/ssh-key/src/private.rs @@ -121,7 +121,7 @@ pub use self::keypair::KeypairData; #[cfg(feature = "alloc")] pub use self::{ dsa::{DsaKeypair, DsaPrivateKey}, - rsa::RsaKeypair, + rsa...
4
166
1
53e23046f574bbb47f6273adb38e3a5ae99183df
Tony Arcieri
2022-04-29T21:39:24
der+x509: replace `Newtype` custom derive macro with macro_rules! (#626) In attempting to implement the `Decode`/`DecodeValue` changes for #525, I ran into trouble trying to modify the `Newtype` derive macro. In its present form it both does quite a bit which makes it difficult to test the lowerings. As the lowerin...
diff --git a/der/derive/src/lib.rs b/der/derive/src/lib.rs index 5f4f5015..c3e2414c 100644 --- a/der/derive/src/lib.rs +++ b/der/derive/src/lib.rs @@ -120,7 +120,6 @@ mod asn1_type; mod attributes; mod choice; mod enumerated; -mod newtype; mod sequence; mod tag; mod value_ord; @@ -130,7 +129,6 @@ use crate::{ ...
15
177
232
fbf4334be7717e1f393c3f7b9b4c85c584ce8395
Tony Arcieri
2022-04-27T19:13:47
der: remove decode-time SET OF ordering checks (#625) Some DER serializer implementations fail to properly sort elements of a `SET OF`. This is technically non-canonical, but occurs frequently enough that most DER decoders tolerate it. Unfortunately because of that, we must also follow suit. This commit builds a...
diff --git a/der/src/arrayvec.rs b/der/src/arrayvec.rs index 04fb8134..6e86ae7d 100644 --- a/der/src/arrayvec.rs +++ b/der/src/arrayvec.rs @@ -85,6 +85,18 @@ impl<T, const N: usize> ArrayVec<T, N> { } } +impl<T, const N: usize> AsRef<[Option<T>]> for ArrayVec<T, N> { + fn as_ref(&self) -> &[Option<T>] { + ...
4
83
37
098a668bc2ae230ccdc94dce386c252304e752ed
Tony Arcieri
2022-04-26T23:40:37
der: feature-gate `real` implementation (#623) Most users of this crate do not need `real`, however its implementation may be problematic in environments that don't have access to floating point, e.g. UEFI or uCs with no FPU. Feature gating it ensures there will be no complications building in these environments...
diff --git a/der/Cargo.toml b/der/Cargo.toml index f58276ed..0519e6a1 100644 --- a/der/Cargo.toml +++ b/der/Cargo.toml @@ -32,6 +32,7 @@ alloc = [] derive = ["der_derive"] oid = ["const-oid"] pem = ["alloc", "pem-rfc7468/alloc", "zeroize"] +real = [] std = ["alloc"] [package.metadata.docs.rs] diff --git a/der/sr...
4
9
10
bcf4aae4acfc5702b86a40c204a3e69e343e7cd7
Tony Arcieri
2022-04-26T22:13:40
ssh-key: further restrict maximum allowed timestamps (#621) Caps maximum allowed Unix timestamps to: 9999-12-31 23:59:59 UTC This is a sanity limit intended to catch nonsense values which are excessively distant in the future.
diff --git a/ssh-key/src/certificate/unix_time.rs b/ssh-key/src/certificate/unix_time.rs index dfa7d00f..f1fc882c 100644 --- a/ssh-key/src/certificate/unix_time.rs +++ b/ssh-key/src/certificate/unix_time.rs @@ -7,8 +7,13 @@ use core::fmt::Formatter; #[cfg(feature = "std")] use std::time::{Duration, SystemTime, UNIX_E...
1
7
2
2ce2e19c560a11cac009d305b1fb99b835ecee92
Tony Arcieri
2022-04-26T18:15:03
pem-rfc7468: add `encapsulated_len_wrapped` (#619) Estimates upper bound of the length of encoded line-wrapped Base64 with a specified customizable line width and line ending. Also changes the input parameters of `encapsulated_len`, which now accepts the length of the raw input data prior to Base64 encoding, mak...
diff --git a/Cargo.lock b/Cargo.lock index fe9703c8..bf8dee19 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -431,7 +431,7 @@ dependencies = [ "der_derive", "flagset", "hex-literal", - "pem-rfc7468 0.5.1", + "pem-rfc7468 0.6.0-pre", "proptest", "time", "zeroize", @@ -841,7 +841,7 @@ dependencies = [ [[packa...
8
125
78