Closed drahnr closed 4 years ago
Since it is not yet in 1.0.0 state, I am more liberal with breaking changes. If possible with a deprecation time of the old API.
So the inclusion of std::str::FromStr
is fine for me.
I like the overall structure you have proposed here.
The only thing we should discuss is the accessibility of the whole signature stuff, as stated in my comments.
The crypto
crate should be private in my opinion. The word "crypto" is very generic and less focused than "signature" which is a much more specialized part of cryptography - and more fitting for the RPM use case.
Intention was to keep the public export of modules identical, but I am happy to clean things up rename crypto to signature.
Renames feature flags from signing-
to signature-*
which is more descriptive - it provides both signing and verification of signatures.
Also moves crypto to signature into the rpm
folder as signature
and unifies the samples.
It looks really good now. The command cargo test --features test-with-podman
has some issues though:
error[E0433]: failed to resolve: could not find `test` in `signature`
--> src/compat_tests.rs:34:50
|
34 | let (signing_key, _) = crate::signature::test::load_asc_keys();
| ^^^^ could not find `test` in `signature`
error[E0433]: failed to resolve: could not find `test` in `signature`
--> src/compat_tests.rs:107:65
|
107 | let (signing_key, verification_key) = crate::signature::test::load_asc_keys();
| ^^^^ could not find `test` in `signature`
can you have a look at this?
Tackles #8
From an external point of view, there is only one minor difference:
75bb239
introduces the traitstd::str::FromStr
forCompressor
which was previously just a regular impl ofpub fn from_str(..)
- clippy complaint.Hence this changeset mandates (at least) a minor release version.