Skip to content

Commit efc249a

Browse files
committed
oid: consistent rustdoc comments, citations
Updates the crate internal rustdoc comments for the various OID constants so that: * each uses the same format of rustdoc comment. * each has the name the OID uses in the cited doc. * each has a citation link to the defining doc. * each citation link uses the ASN.1 module definition, not the doc section explaining the usage of the associated feature.
1 parent 8cabd4b commit efc249a

File tree

1 file changed

+26
-32
lines changed

1 file changed

+26
-32
lines changed

src/oid.rs

Lines changed: 26 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,68 @@
1-
/// pkcs-9-at-extensionRequest in RFC 2985
1+
/// pkcs-9-at-extensionRequest in [RFC 2985](https://www.rfc-editor.org/rfc/rfc2985#appendix-A)
22
pub const OID_PKCS_9_AT_EXTENSION_REQUEST: &[u64] = &[1, 2, 840, 113549, 1, 9, 14];
33

4-
/// id-at-countryName in RFC 5280
4+
/// id-at-countryName in [RFC 5280](https://www.rfc-editor.org/rfc/rfc5280#appendix-A)
55
pub const OID_COUNTRY_NAME: &[u64] = &[2, 5, 4, 6];
6-
/// id-at-localityName in RFC 5280
6+
/// id-at-localityName in [RFC 5280](https://www.rfc-editor.org/rfc/rfc5280#appendix-A)
77
pub const OID_LOCALITY_NAME: &[u64] = &[2, 5, 4, 7];
8-
/// id-at-stateOrProvinceName in RFC 5280
8+
/// id-at-stateOrProvinceName in [RFC 5280](https://www.rfc-editor.org/rfc/rfc5280#appendix-A)
99
pub const OID_STATE_OR_PROVINCE_NAME: &[u64] = &[2, 5, 4, 8];
10-
/// id-at-organizationName in RFC 5280
10+
/// id-at-organizationName in [RFC 5280](https://www.rfc-editor.org/rfc/rfc5280#appendix-A)
1111
pub const OID_ORG_NAME: &[u64] = &[2, 5, 4, 10];
12-
/// id-at-organizationalUnitName in RFC 5280
12+
/// id-at-organizationalUnitName in [RFC 5280](https://www.rfc-editor.org/rfc/rfc5280#appendix-A)
1313
pub const OID_ORG_UNIT_NAME: &[u64] = &[2, 5, 4, 11];
14-
/// id-at-commonName in RFC 5280
14+
/// id-at-commonName in [RFC 5280](https://www.rfc-editor.org/rfc/rfc5280#appendix-A)
1515
pub const OID_COMMON_NAME: &[u64] = &[2, 5, 4, 3];
1616

17-
// https://tools.ietf.org/html/rfc5480#section-2.1.1
17+
/// id-ecPublicKey in [RFC 5480](https://datatracker.ietf.org/doc/html/rfc5480#appendix-A)
1818
pub const OID_EC_PUBLIC_KEY: &[u64] = &[1, 2, 840, 10045, 2, 1];
19+
/// secp256r1 in [RFC 5480](https://datatracker.ietf.org/doc/html/rfc5480#appendix-A)
1920
pub const OID_EC_SECP_256_R1: &[u64] = &[1, 2, 840, 10045, 3, 1, 7];
21+
/// secp384r1 in [RFC 5480](https://datatracker.ietf.org/doc/html/rfc5480#appendix-A)
2022
pub const OID_EC_SECP_384_R1: &[u64] = &[1, 3, 132, 0, 34];
2123

22-
// rsaEncryption in RFC 4055
24+
/// rsaEncryption in [RFC 4055](https://www.rfc-editor.org/rfc/rfc4055#section-6)
2325
pub const OID_RSA_ENCRYPTION: &[u64] = &[1, 2, 840, 113549, 1, 1, 1];
2426

25-
// id-RSASSA-PSS in RFC 4055
27+
/// id-RSASSA-PSS in [RFC 4055](https://www.rfc-editor.org/rfc/rfc4055#section-6)
2628
pub const OID_RSASSA_PSS: &[u64] = &[1, 2, 840, 113549, 1, 1, 10];
2729

28-
// https://datatracker.ietf.org/doc/html/rfc5280#section-4.2.1.3
30+
/// id-ce-keyUsage in [RFC 5280](https://tools.ietf.org/html/rfc5280#appendix-A.2)
2931
pub const OID_KEY_USAGE: &[u64] = &[2, 5, 29, 15];
3032

31-
// https://tools.ietf.org/html/rfc5280#appendix-A.2
32-
// https://tools.ietf.org/html/rfc5280#section-4.2.1.6
33+
/// id-ce-subjectAltName in [RFC 5280](https://tools.ietf.org/html/rfc5280#appendix-A.2)
3334
pub const OID_SUBJECT_ALT_NAME: &[u64] = &[2, 5, 29, 17];
3435

35-
// https://tools.ietf.org/html/rfc5280#section-4.2.1.9
36+
/// id-ce-basicConstraints in [RFC 5280](https://tools.ietf.org/html/rfc5280#appendix-A.2)
3637
pub const OID_BASIC_CONSTRAINTS: &[u64] = &[2, 5, 29, 19];
3738

38-
// https://tools.ietf.org/html/rfc5280#section-4.2.1.2
39+
/// id-ce-subjectKeyIdentifier in [RFC 5280](https://www.rfc-editor.org/rfc/rfc5280#appendix-A)
3940
pub const OID_SUBJECT_KEY_IDENTIFIER: &[u64] = &[2, 5, 29, 14];
4041

41-
// https://tools.ietf.org/html/rfc5280#section-4.2.1.1
42+
/// id-ce-authorityKeyIdentifier in [RFC 5280](https://www.rfc-editor.org/rfc/rfc5280#appendix-A)
4243
pub const OID_AUTHORITY_KEY_IDENTIFIER: &[u64] = &[2, 5, 29, 35];
4344

44-
// id-ce-extKeyUsage in
45-
// https://tools.ietf.org/html/rfc5280#section-4.2.1.12
45+
/// id-ce-extKeyUsage in [RFC 5280](https://www.rfc-editor.org/rfc/rfc5280#appendix-A)
4646
pub const OID_EXT_KEY_USAGE: &[u64] = &[2, 5, 29, 37];
4747

48-
// id-ce-nameConstraints in
49-
// https://tools.ietf.org/html/rfc5280#section-4.2.1.10
48+
/// id-ce-nameConstraints in [RFC 5280](https://www.rfc-editor.org/rfc/rfc5280#appendix-A)
5049
pub const OID_NAME_CONSTRAINTS: &[u64] = &[2, 5, 29, 30];
5150

52-
// id-ce-cRLDistributionPoints in
53-
// https://www.rfc-editor.org/rfc/rfc5280#section-4.2.1.13
51+
/// id-ce-cRLDistributionPoints in [RFC 5280](https://www.rfc-editor.org/rfc/rfc5280#appendix-A)
5452
pub const OID_CRL_DISTRIBUTION_POINTS: &[u64] = &[2, 5, 29, 31];
5553

56-
// id-pe-acmeIdentifier in
57-
// https://www.iana.org/assignments/smi-numbers/smi-numbers.xhtml#smi-numbers-1.3.6.1.5.5.7.1
54+
/// id-pe-acmeIdentifier in
55+
/// [IANA SMI Numbers registry](https://www.iana.org/assignments/smi-numbers/smi-numbers.xhtml#smi-numbers-1.3.6.1.5.5.7.1)
5856
pub const OID_PE_ACME: &[u64] = &[1, 3, 6, 1, 5, 5, 7, 1, 31];
5957

60-
// id-ce-cRLNumber in
61-
// https://www.rfc-editor.org/rfc/rfc5280#section-5.2.3
58+
/// id-ce-cRLNumber in [RFC 5280](https://www.rfc-editor.org/rfc/rfc5280#appendix-A)
6259
pub const OID_CRL_NUMBER: &[u64] = &[2, 5, 29, 20];
6360

64-
// id-ce-cRLReasons
65-
// https://www.rfc-editor.org/rfc/rfc5280#section-5.3.1
61+
/// id-ce-cRLReasons in [RFC 5280](https://www.rfc-editor.org/rfc/rfc5280#appendix-A)
6662
pub const OID_CRL_REASONS: &[u64] = &[2, 5, 29, 21];
6763

68-
// id-ce-invalidityDate
69-
// https://www.rfc-editor.org/rfc/rfc5280#section-5.3.2
64+
/// id-ce-invalidityDate in [RFC 5280](https://www.rfc-editor.org/rfc/rfc5280#appendix-A)
7065
pub const OID_CRL_INVALIDITY_DATE: &[u64] = &[2, 5, 29, 24];
7166

72-
// id-ce-issuingDistributionPoint
73-
// https://datatracker.ietf.org/doc/html/rfc5280#section-5.2.5
67+
/// id-ce-issuingDistributionPoint in [RFC 5280](https://www.rfc-editor.org/rfc/rfc5280#appendix-A)
7468
pub const OID_CRL_ISSUING_DISTRIBUTION_POINT: &[u64] = &[2, 5, 29, 28];

0 commit comments

Comments
 (0)