pub enum RsaKeyDeviation {
NonMinimalInteger,
NegativeInteger,
}rsa only.Expand description
Reading an RSA public key whose DER INTEGERs are not minimal, and
saying what had to be forgiven. See rsa_public_key_lenient.
The link carries no explicit target: this pub use re-exports
rsa_public_key_lenient, so the label resolves on its own and an
explicit one is redundant. rustdoc says so under -D warnings and
cannot say where, because a doc comment on a multi-item pub use is
attached to each item – one link, two warnings, no single span.
Reading an RSA public key whose DER INTEGERs are not minimal, and
saying what had to be forgiven. See rsa_public_key_lenient.
The link carries no explicit target: this pub use re-exports
rsa_public_key_lenient, so the label resolves on its own and an
explicit one is redundant. rustdoc says so under -D warnings and
cannot say where, because a doc comment on a multi-item pub use is
attached to each item – one link, two warnings, no single span.
Reading an RSA public key whose DER INTEGERs are not minimal, and
saying what had to be forgiven. See rsa_public_key_lenient.
The link carries no explicit target: this pub use re-exports
rsa_public_key_lenient, so the label resolves on its own and an
explicit one is redundant. rustdoc says so under -D warnings and
cannot say where, because a doc comment on a multi-item pub use is
attached to each item – one link, two warnings, no single span.
Decodes an RSA public key from an SPKI whose algorithm is rsaEncryption
(parameters NULL or absent, RFC 3279 §2.3.1) or, when allow_pss_key is
set, id-RSASSA-PSS (RFC 4055 §1.2).
Moduli from 1024 to 8192 bits are accepted (the rsa crate’s limits).
What an RSA public key’s DER had to be forgiven for.
Returned beside the key by rsa_public_key_lenient, so a caller
learns what was tolerated rather than only that it worked. Nothing in
this crate acts on the value; it exists because silently accepting
malformed input is how a lenient parser becomes a liability.
Variants§
NonMinimalInteger
An INTEGER carried more leading zero octets than it needs.
02 04 00 00 00 03 for the exponent 3, where DER requires the
minimal 02 01 03. Unambiguous: the extra octets change no
value, and X.690 §8.3.2 forbids them only so that one value has
one encoding.
Austria’s a-sign Premium CA and a-sign uni, in
third_party/trust-stores/eu-eidas/, both do this.
NegativeInteger
An INTEGER’s high bit was set without the leading zero octet that DER requires, so as written it denotes a negative number.
02 04 C0 00 00 01 for the exponent 0xC0000001, where the
canonical form is 02 05 00 C0 00 00 01. Reading it as positive
is a reinterpretation, not a relaxed length check – see
rsa_public_key_lenient on why that is sound for this field
and would not be elsewhere.
Germany’s 3R-CA 1:PN and 4R-CA 1:PN of January 1999 do this;
5R-CA of March 2000 encodes the identical exponent correctly,
so it was an encoder bug they fixed within fourteen months.