Commit Graph

80 Commits

Author SHA1 Message Date
b0277bb0ad Bump version number to cover security and clippy/fmt patches. 2021-11-14 13:51:47 -08:00
4df1173ecb Fix formatting to rustfmt standards. 2021-11-14 13:50:25 -08:00
f4755e9b37 Merge pull request #29 from nmathewson/clippy_warnings
Fix all clippy warnings in the current code under Rust 1.56.
2021-11-14 13:49:33 -08:00
61533920f6 Merge pull request #28 from nmathewson/fix_string_slice
[security] Fix a panic from an unchecked string slice.
2021-11-14 13:45:34 -08:00
Nick Mathewson
9ab60920d2 Fix all clippy warnings in the current code under Rust 1.56. 2021-11-14 15:40:24 -05:00
Nick Mathewson
c981004290 Fix a panic from an unchecked string slice.
When slicing a string, you get a panic if you do so at any point
other than at a character boundary.  This happened in the
implementation of UTCTime parsing.

This bug was introduced in bc156c36d7,
and appears to affect only version 0.6.0.

I've tried using the clippy::string_slice lint to confirm that there
are not any other string slices in this code.

Fixes bug #27.  Found via fuzzing.
2021-11-14 09:46:36 -05:00
bc156c36d7 Bump version number to reflect API change. 2021-10-20 10:08:40 -07:00
fc5e1e7e97 Merge pull request #26 from Adam-Gleave/remove-chrono
Remove `chrono` dependency in favour of `time` crate
2021-10-20 10:07:18 -07:00
Adam-Gleave
34c0267144 Remove comment 2021-10-20 17:51:30 +01:00
Adam-Gleave
d7d39d7095 Remove chrono dependency in favour of time crate 2021-10-20 17:30:37 +01:00
77a9c2b48f Bump rand version to 0.8.4, and crate version to 0.5.4. 2021-06-24 19:34:14 -07:00
4ea0b30437 Merge pull request #25 from randombit/jack/add-crate
Add $crate:: metavariable to the oid! macro
2021-06-24 19:30:56 -07:00
Jack Lloyd
fcba9cb4be Add $crate:: metavariable to the oid! macro
This allows using the oid macro without having to import BigUint
2021-06-22 12:14:39 -04:00
1568c1bbf9 Merge pull request #24 from randombit/jack/add-eq-for-oid
impl Eq for OID
2021-06-03 17:14:22 -07:00
Jack Lloyd
3bc5c14a19 impl Eq for OID
Closes #23
2021-06-03 16:56:40 -04:00
35cdea3dbe Bump version to 0.5.3 2021-05-18 08:06:33 -07:00
1e141a9393 Merge pull request #22 from zartarn15/master
Implement as_vec for OID
2021-05-18 08:05:09 -07:00
Oleksandr Kravchenko
2d2d9a3bbb Implement as_vec for OID
Change-Id: I29d59b77b541454007343488f8f809c3052ad3e3
2021-05-18 12:46:58 +03:00
19a466bb07 Bump the version to 0.5.2. 2021-04-18 13:20:33 -07:00
c585acc530 Upgrade the QuickCheck/rand dependencies.
This also adds a check in the synthesis of arbitary items of unknown type,
to ensure that we don't accidentally create objects with a known type. I'm
actually not 100% sure how the old tests were passing so reliably, which
is worrying.
2021-04-18 13:17:01 -07:00
483e692109 Merge pull request #21 from stanislav-tkach/patch-1
Update the `num-bigint` crate version
2021-04-17 13:08:54 -07:00
Stanislav Tkach
8305ec24d7 Update the num-bigint crate version 2021-04-14 15:17:23 +03:00
04ee38744f Merge pull request #20 from seinlin/issue-19
Add the missing N character.
2021-02-25 12:02:12 -08:00
Seinlin Li
1903cb6ab5 Add the missing N character. 2021-02-25 01:33:17 -08:00
90d24b6d89 Version number bump (0.5.0 --> 0.5.1) 2021-01-08 09:20:05 -08:00
fcab888856 Merge pull request #18 from rib/wip/rib/thiserror
Use thiserror macro to derive Error + Display traits
2021-01-08 09:16:43 -08:00
Robert Bragg
559db125d3 Use thiserror macro to derive Error + Display traits
This removes the manual implementation of Display + Error for
ASN1EncodeErr and uses the derive macro from `thiserror` to add
std Error and Display implementations for ANS1EncodeErr and
ASN1DecodeErr.
2021-01-08 13:53:53 +00:00
1a246d5970 Merge branch 'master' of github.com:acw/simple_asn1 2020-10-19 20:23:32 -07:00
7f836fc3ed Merge pull request #16 from c410-f3r/master
Update dependencies, clean up some random number generation.
2020-10-19 10:22:12 -07:00
Caio
7db7a487f4 Update dependencies 2020-10-17 22:59:31 -03:00
7b6e48d8fb Bump minor version, to address license change. 2020-07-15 08:20:25 -07:00
c7bc3f9513 Merge pull request #15 from marco-neumann-jdas/fix_license_metadata
use a machine-readable license key
2020-07-15 08:18:46 -07:00
Marco Neumann
d4ac17598a use a machine-readable license key
See https://doc.rust-lang.org/cargo/reference/manifest.html#the-license-and-license-file-fields :

> If a package is using a nonstandard license, then the license-file field may be specified in lieu of the license
> field.

`simple_asn1` however uses a standard license (ISC, as per LICENSE).
Note that this is also a somewhat commonly used way by many projects
(see for example Cargo or serde).

Using the machine-readable SPX specifier instead of a text file helps
automatic tooling like [cargo-lichking](https://github.com/Nemo157/cargo-lichking) to check licenses of projects and
dependencies.
2020-07-13 15:21:05 +02:00
5d07dc7cc3 Remove some post-fmt warnings. 2020-06-14 17:01:24 -07:00
5bb01ae0e4 Make this subject to rustfmt. 2020-06-14 16:38:23 -07:00
ce2bf1407c Start bringing this library into a more modern idiom. 2020-06-14 16:37:43 -07:00
f17f1eb246 Merge pull request #12 from drahnr/master
OID as_raw
2019-12-14 09:59:47 -08:00
Bernhard Schuster
47a5140bf2 feat(as_raw) impl as_raw for OID 2019-12-13 21:27:47 +01:00
Bernhard Schuster
52348af492 chore(fmt): cargo fmt 2019-12-13 21:24:48 +01:00
Bernhard Schuster
ab7616a86c feat(OID): silence warnings 2019-12-13 21:15:28 +01:00
113c6ad16a Merge pull request #10 from twjang/master
BigUint(0) bug fixed (encode_base127)
2019-09-11 22:05:16 -07:00
nyamnyam
7c8e01f5b2 BigUint(0) bug fixed (encode_base127) 2019-09-12 10:16:53 +09:00
5b62a49298 Bump version to 0.4.0. 2019-03-29 16:21:04 -07:00
Adam Wick
800f165977 Merge pull request #9 from Flakebi/master
Return error instead of panics on invalid ASN.1
2019-03-29 16:20:12 -07:00
b72f384989 Test reparsing generated GeneralizedTimes, to expose a bug that's about to get fixed. 2019-03-29 16:18:17 -07:00
Flakebi
0641eff20b Add errors for panics found by fuzzing 2019-03-29 18:44:09 +01:00
Flakebi
34764ca9bf Add cargo-fuzz target 2019-03-29 18:44:09 +01:00
Flakebi
115859668c Remove usage of deprecated functions 2019-03-29 16:38:56 +01:00
Flakebi
8a64254c95 Return error on invalid length 2019-03-29 16:30:13 +01:00
c6b8e90a50 Bump version number. 2019-03-27 09:03:17 -07:00