From d9e4a422774b806423dea08359663c946f984ed0 Mon Sep 17 00:00:00 2001 From: goldlinker Date: Sun, 7 Dec 2025 16:43:51 +0800 Subject: [PATCH] chore: fix some minor issues in comments Signed-off-by: goldlinker --- README.md | 2 +- UPGRADING.md | 2 +- src/der/parser.rs | 2 +- src/lib.rs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 43991cc..4af37a2 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ encode and decode ASN.1 objects in binary. [X.690] also defines Distinguished Encoding Rules (DER), which is BER with added rules to ensure canonical and unequivocal binary representation of objects. -The choice of which one to use is usually guided by the speficication of the data format based +The choice of which one to use is usually guided by the specification of the data format based on BER or DER: for example, X.509 uses DER as encoding representation. See the related modules for object definitions, functions, and example: diff --git a/UPGRADING.md b/UPGRADING.md index 3df0ed2..2162e2d 100644 --- a/UPGRADING.md +++ b/UPGRADING.md @@ -10,7 +10,7 @@ Header names have changed: Changing the names should be enough for upgrades. -To eventually ease upgrades, a new module (`der_parser::ber::compat`) has been added, to provide aliases for these types. It must be imported explicitely. +To eventually ease upgrades, a new module (`der_parser::ber::compat`) has been added, to provide aliases for these types. It must be imported explicitly. Header fields are now private. Getters/setters have been added, and must be used to access/modify fields. Replace: - `hdr.len` by `hdr.length()` diff --git a/src/der/parser.rs b/src/der/parser.rs index 9a35b64..6160a0e 100644 --- a/src/der/parser.rs +++ b/src/der/parser.rs @@ -131,7 +131,7 @@ pub fn parse_der_integer(i: &[u8]) -> DerResult<'_> { /// Read an bitstring value /// /// To access the content as plain bytes, you will have to -/// interprete the resulting tuple which will contain in +/// interpret the resulting tuple which will contain in /// its first item the number of padding bits left at /// the end of the bit string, and in its second item /// a `BitStringObject` structure which will, in its sole diff --git a/src/lib.rs b/src/lib.rs index 5cfcb41..0e1eedd 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -27,7 +27,7 @@ //! [X.690] also defines Distinguished Encoding Rules (DER), which is BER with added rules to //! ensure canonical and unequivocal binary representation of objects. //! -//! The choice of which one to use is usually guided by the speficication of the data format based +//! The choice of which one to use is usually guided by the specification of the data format based //! on BER or DER: for example, X.509 uses DER as encoding representation. //! //! See the related modules for object definitions, functions, and example: