diff --git a/.vscode/ltex.dictionary.en-US.txt b/.vscode/ltex.dictionary.en-US.txt index a5427b3..9725610 100644 --- a/.vscode/ltex.dictionary.en-US.txt +++ b/.vscode/ltex.dictionary.en-US.txt @@ -32,3 +32,23 @@ signatureAlgorithm SignatureAlgorithms PKCS DigitalSignature +KeyUsage +CrlSign +ContentCommitment +KeyEncipherment +DataEncipherment +KeyAgreement +KeyCertSign +EncipherOnly +DecipherOnly +BasicConstraints +KeyUsages +SessionId +attr +basicConstraints +Csr +keyUsage +extnValue +extnID +CSRs +IdCsrInner diff --git a/.vscode/ltex.hiddenFalsePositives.en-US.txt b/.vscode/ltex.hiddenFalsePositives.en-US.txt index e4fee1b..eb4a05a 100644 --- a/.vscode/ltex.hiddenFalsePositives.en-US.txt +++ b/.vscode/ltex.hiddenFalsePositives.en-US.txt @@ -3,3 +3,15 @@ {"rule":"COMMA_PARENTHESIS_WHITESPACE","sentence":"^\\QCertificationRequestInfo ::= SEQUENCE {\nversion INTEGER { v1(0) } (v1,...),\nsubject Name,\nsubjectPKInfo SubjectPublicKeyInfo{{ PKInfoAlgorithms }},\nattributes 0 Attributes{{ CRIAttributes }}\n}\\E$"} {"rule":"ENGLISH_WORD_REPEAT_RULE","sentence":"^\\QCertificationRequest ::= SEQUENCE {\ncertificationRequestInfo CertificationRequestInfo,\nsignatureAlgorithm AlgorithmIdentifier{{ SignatureAlgorithms }},\nsignature BIT STRING\n}\\E$"} {"rule":"COMMA_PARENTHESIS_WHITESPACE","sentence":"^\\QCertificationRequest ::= SEQUENCE {\ncertificationRequestInfo CertificationRequestInfo,\nsignatureAlgorithm AlgorithmIdentifier{{ SignatureAlgorithms }},\nsignature BIT STRING\n}\\E$"} +{"rule":"ENGLISH_WORD_REPEAT_BEGINNING_RULE","sentence":"^\\QObject Identifier for the KeyUsage::ContentCommitment variant.\\E$"} +{"rule":"ENGLISH_WORD_REPEAT_BEGINNING_RULE","sentence":"^\\QObject Identifier for the KeyUsage::KeyEncipherment variant.\\E$"} +{"rule":"ENGLISH_WORD_REPEAT_BEGINNING_RULE","sentence":"^\\QObject Identifier for the KeyUsage::DataEncipherment variant.\\E$"} +{"rule":"ENGLISH_WORD_REPEAT_BEGINNING_RULE","sentence":"^\\QObject Identifier for the KeyUsage::KeyAgreement variant.\\E$"} +{"rule":"ENGLISH_WORD_REPEAT_BEGINNING_RULE","sentence":"^\\QObject Identifier for the KeyUsage::KeyCertSign variant.\\E$"} +{"rule":"ENGLISH_WORD_REPEAT_BEGINNING_RULE","sentence":"^\\QObject Identifier for the KeyUsage::EncipherOnly variant.\\E$"} +{"rule":"ENGLISH_WORD_REPEAT_BEGINNING_RULE","sentence":"^\\QObject Identifier for the KeyUsage::DecipherOnly variant.\\E$"} +{"rule":"ENGLISH_WORD_REPEAT_BEGINNING_RULE","sentence":"^\\QObject Identifier for the BasicConstraints variant.\\E$"} +{"rule":"ENGLISH_WORD_REPEAT_BEGINNING_RULE","sentence":"^\\QObject Identifier for the KeyUsage flag.\\E$"} +{"rule":"UNLIKELY_OPENING_PUNCTUATION","sentence":"^\\Q:3\\E$"} +{"rule":"DOUBLE_PUNCTUATION","sentence":"^\\QExtensions ::= SEQUENCE SIZE (1..MAX) OF Extension\\E$"} +{"rule":"COMMA_PARENTHESIS_WHITESPACE","sentence":"^\\QExtension ::= SEQUENCE {\nextnID OBJECT IDENTIFIER,\ncritical BOOLEAN DEFAULT FALSE,\nextnValue OCTET STRING\n-- contains the DER encoding of an ASN.1 value\n-- corresponding to the extension type identified\n-- by extnID\n}\\E$"} diff --git a/src/certs/mod.rs b/src/certs/mod.rs index e2f0cc5..887fc16 100644 --- a/src/certs/mod.rs +++ b/src/certs/mod.rs @@ -58,7 +58,7 @@ impl SessionId { } } -#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)] +#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash, PartialOrd, Ord)] #[repr(u8)] /// `PKCS#10` version. From the PKCS specification document (RFC 2986): /// > version is the version number, for compatibility with future