6 Commits

Author SHA1 Message Date
Tony Arcieri
eb8bc2211f
Fix PKCS#1/PKCS#8 line endings on Windows (#181)
The checked-in files use Unix-style line endings, so use
`LineEnding::LF` in tests, rather than `Default::default` (which uses
OS-specific line endings.

Also adds a `.gitattributes` file which specifies these files should
always be checked out with `eol=lf`.
2022-09-06 10:38:54 -06:00
Quentin Gliech
2b8b7dd4bb
Bump pkcs1 => 0.4, pkcs8 => 0.9 (#162)
Also bumps MSRV to 1.57
2022-05-23 20:44:33 -06:00
Artyom Pavlov
cf27569687
Replace rand dependency with rand_core (#148) 2022-03-13 19:50:05 +00:00
Tony Arcieri
e4366a7e8f Bump pkcs1 => v0.3, pkcs8 => v0.8; MSRV 1.56
Updates the `pkcs1` and `pkcs8` crates to their latest versions.

These releases reversed the blanket impl relationship between the traits
in the two respective crates.

The names of the traits have changed:
- `From*Key` => `Decode*Key` (e.g. `DecodePrivateKey`)
- `To*Key` => `Encode*Key` (e.g. `EncodePrivateKey`).

Previously there was a blanket impl of `pkcs8` traits for the `pkcs1`
crates, e.g. `DecodePrivateKey` was impl'd for `DecodeRsaPrivateKey`.

This relationship has been reversed in the latest releases, and as such
this commit now implements the `pkcs8` traits instead of the `pkcs1`
traits (even though this internally involves decoding a PKCS#1 document
as part of PKCS#8 decoding).

The reasoning is this was necessary to make it possible for traits for
multiple formats to have blanket impls for the PKCS#8 traits. Concretely
this was needed to allow blanket impls of the traits in the `sec1` crate
for types which impl traits from the `pkcs8` crate.

Both of these crates are MSRV 1.56 and hard dependencies, so the MSRV of
the `rsa` crate is accordingly bumped to 1.56.
2022-01-16 10:57:11 -07:00
dignifiedquire
7a1eaa0329 refactor: rename RSA* to Rsa
This matches the rust naming convention better.

Closes #24
2021-07-26 23:25:13 +02:00
Tony Arcieri
f251dee5a9
Use pkcs1 and pkcs8 crates; MSRV 1.51+ (#104)
This is an initial attempt to switch the `rsa` crate to use the `pkcs1`
and `pkcs8` crates from https://github.com/rustcrypto/utils
2021-07-26 13:57:23 -07:00