Skip to content

Commit 498ee2a

Browse files
author
gefeili
committed
Fix javadoc doclint issues across core, pg, pkix and prov: broken and cross-module @link references, an invalid wildcard member link, unescaped '<' text, a malformed <a href> tag, stale @PARAM names, an @implNote tag doclint doesn't recognise, a nested-class link naming the wrong enclosing type, an @deprecated tag in package documentation, and a self-closing <p/>
1 parent 77a2f72 commit 498ee2a

14 files changed

Lines changed: 24 additions & 23 deletions

File tree

‎core/src/main/java/org/bouncycastle/asn1/x500/X500Name.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ public X500Name(X500NameStyle style, X500Name name)
5151
/**
5252
* Return a X500Name based on the passed in tagged object.
5353
*
54-
* @param obj tag object holding name.
55-
* @param explicit true if explicitly tagged false otherwise.
54+
* @param taggedObject tag object holding name.
55+
* @param declaredExplicit true if explicitly tagged false otherwise.
5656
* @return the X500Name
5757
*/
5858
public static X500Name getInstance(ASN1TaggedObject taggedObject, boolean declaredExplicit)

‎core/src/main/java/org/bouncycastle/asn1/x509/X509Extension.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ public class X509Extension
160160
public static final ASN1ObjectIdentifier auditIdentity = new ASN1ObjectIdentifier("1.3.6.1.5.5.7.1.4");
161161

162162
/**
163-
* <a href="https://davidben.github.io/merkle-tree-certs/draft-ietf-plants-merkle-tree-certs.html>Merkle Tree Certificates</a>
163+
* <a href="https://davidben.github.io/merkle-tree-certs/draft-ietf-plants-merkle-tree-certs.html">Merkle Tree Certificates</a>
164164
* 1.3.6.1.5.5.7.25.TBD
165165
* */
166166
public static final ASN1ObjectIdentifier id_rdna_trustAnchorID = new ASN1ObjectIdentifier("1.3.6.1.5.5.7.25");
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* ML-DSA (FIPS 204) bindings of the lightweight signer API. Wraps the primitives in
3-
* {@link org.bouncycastle.pqc.crypto.mldsa} as {@link org.bouncycastle.crypto.Signer} /
4-
* {@link org.bouncycastle.crypto.StatefulSigner} implementations.
3+
* {@link org.bouncycastle.pqc.crypto.mldsa} as {@link org.bouncycastle.crypto.Signer}
4+
* implementations.
55
*/
66
package org.bouncycastle.crypto.signers.mldsa;

‎core/src/main/java/org/bouncycastle/pqc/crypto/mqom/MQOMParameters.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
* convention used by <a href="https://github.com/mqom/mqom-v2">mqom-v2</a>.
77
*
88
* <p>All 48 standardised parameter sets are declared here. Whether a given set
9-
* is wired through to a working engine is reported by {@link MQOMEngineSupport}
10-
* (loaded indirectly through {@code MQOMEngine.getInstance}); declaring the
9+
* is wired through to a working engine is reported by
10+
* {@link MQOMEngine#getInstance(MQOMParameters) MQOMEngine.getInstance}; declaring the
1111
* constants up front lets callers reference parameter names independently of
1212
* the engine roadmap.
1313
*/

‎core/src/main/java/org/bouncycastle/pqc/crypto/qruov/QRUOVParameters.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
* F_q with q in {7, 31, 127}, a quotient ring extension F_q^L = F_q[X]/f(X) for
99
* a small irreducible f(X) = x^L - fc * x^fe - fc0, and dimensions (v, m).
1010
* <p>
11-
* The {@link #qruov_*_shake} constants use SHAKE as the pseudo-random generator
12-
* (matching the {@code kat_shake} test vectors); the {@link #qruov_*_aes} constants
11+
* The {@code qruov_*_shake} constants use SHAKE as the pseudo-random generator
12+
* (matching the {@code kat_shake} test vectors); the {@code qruov_*_aes} constants
1313
* use AES-CTR (matching the {@code kat_aes} test vectors). Algorithm output is
1414
* otherwise identical apart from the PRG-driven expansions.
1515
*/

‎core/src/main/java/org/bouncycastle/util/Properties.java‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public class Properties
6464
* unrestricted: RFC 5280 sec. 4.2.1.13 requires a distribution point URI to name a protocol
6565
* but does not limit which, and BC supports http, https, ftp and ldap here, so this is an
6666
* operator policy for deployments that want a narrower set rather than a default.
67-
* <p/>
67+
* <p>
6868
* Note the CRL fetch this governs only happens at all when {@link #X509_ENABLE_CRLDP} is set.
6969
*/
7070
public static final String X509_CRLDP_PROTOCOLS = "org.bouncycastle.x509.CRLDP_protocols";
@@ -266,7 +266,7 @@ public class Properties
266266

267267
/**
268268
* Upper bound on the RFC 4211 PKMAC / CMP password-based-MAC iteration count honoured when no
269-
* explicit ceiling was supplied to {@link org.bouncycastle.cert.crmf.PKMACBuilder}. The count
269+
* explicit ceiling was supplied to {@code org.bouncycastle.cert.crmf.PKMACBuilder}. The count
270270
* travels in the (unauthenticated) PBMParameter of an incoming CMP message and drives an
271271
* iterated hash, so an unbounded count makes verifying an attacker-supplied message a
272272
* CPU-exhaustion vector. Default 10,000,000, generous enough for any legitimate setting. Read
@@ -366,7 +366,7 @@ public class Properties
366366
* per-entry sealed-key decryption), and is read from the (not-yet-verified) keystore ahead of
367367
* the HMAC integrity check, so an unbounded value is a pre-integrity CPU-exhaustion vector -
368368
* the analogue of {@link #BCFKS_MAX_IT_COUNT} / {@link #PKCS12_MAX_IT_COUNT} for the BKS
369-
* format (the sibling UBER store already caps its own count). Default 1048576 (1 << 20); the
369+
* format (the sibling UBER store already caps its own count). Default 1048576 ({@code 1 << 20}); the
370370
* BKS writer uses ~1024-2047. Read via {@link #asInteger(String, int)}.
371371
*/
372372
public static final String BKS_MAX_IT_COUNT = "org.bouncycastle.bks.max_it_count";
@@ -378,7 +378,7 @@ public class Properties
378378
* pre-integrity CPU-exhaustion vector - the OpenSSH analogue of {@link #BCFKS_MAX_IT_COUNT} /
379379
* {@link #PKCS12_MAX_IT_COUNT}. A round costs several milliseconds, so the 2^31-1 the wire
380380
* format allows is worth CPU-months from a key file of a few hundred bytes. Reached only when
381-
* a passphrase is supplied, i.e. on the key-import path. Default 1048576 (1 << 20); ssh-keygen
381+
* a passphrase is supplied, i.e. on the key-import path. Default 1048576 ({@code 1 << 20}); ssh-keygen
382382
* defaults to 16 and its -a option is rarely taken far beyond a few hundred. Read via
383383
* {@link #asInteger(String, int)}.
384384
*/

‎pg/src/main/java/org/bouncycastle/bcpg/HashUtils.java‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,12 @@ public static int getV6SignatureSaltSizeInBytes(int hashAlgorithm)
3333

3434
/**
3535
* Return true, if the encountered saltLength matches the value the specification gives for the hashAlgorithm.
36+
* <p>
37+
* Note: LibrePGP allows for zero-length signature salt values, so this method only works for IETF OpenPGP v6.
3638
*
3739
* @param hashAlgorithm hash algorithm tag
3840
* @param saltSize encountered salt size
3941
* @return true if the encountered size matches the spec
40-
* @implNote LibrePGP allows for zero-length signature salt values, so this method only works for IETF OpenPGP v6.
4142
*/
4243
public boolean saltSizeMatchesSpec(int hashAlgorithm, int saltSize)
4344
{

‎pkix/src/main/java/org/bouncycastle/cert/RelatedCertificateTool.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@
5050
* {@code org.bouncycastle.operator}, so both the lightweight (BC) and JCA
5151
* bindings of those operator interfaces are equally usable. Wrapping /
5252
* unwrapping the value as a PKCS#9 {@link org.bouncycastle.asn1.pkcs.Attribute}
53-
* lives on the value class itself — see {@link RequesterCertificate#toAttribute()}
54-
* and {@link RequesterCertificate#fromAttribute(org.bouncycastle.asn1.pkcs.Attribute)}.
53+
* lives on this class itself — see {@link #toAttribute(RequesterCertificate)}
54+
* and {@link #fromAttribute(org.bouncycastle.asn1.pkcs.Attribute)}.
5555
*/
5656
public class RelatedCertificateTool
5757
{

‎pkix/src/main/java/org/bouncycastle/cert/plants/MerkleTreeCertEntryExtension.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* </pre>
1515
*
1616
* <p>The {@code extension_type} is a uint16 (the draft assigns no concrete
17-
* values yet) and {@code extension_data} is opaque<0..65535>. Extensions
17+
* values yet) and {@code extension_data} is {@code opaque<0..65535>}. Extensions
1818
* carried inside a {@link MTCProof} or hashed into a log entry MUST appear
1919
* in ascending order by {@code extension_type} with no duplicates; the
2020
* {@link MTCProof} encoder/decoder enforces this.</p>

‎pkix/src/main/java/org/bouncycastle/cert/plants/MerkleTreeCertificateValidator.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
* {@link MTCProof} carried in the certificate's {@code signatureValue},
4040
* recomputes the entry hash from the TBSCertificate, evaluates the inclusion
4141
* proof against the supplied {@link MerkleTreeHash}, and then either matches
42-
* the resulting subtree hash against a {@link ValidationParams.TrustedSubtree}
42+
* the resulting subtree hash against a {@link TrustedSubtree}
4343
* or counts valid cosignatures against the relying party's
4444
* {@link MTCCosignerVerifierProvider} until {@code minCosignatures} is met.</p>
4545
*/

0 commit comments

Comments
 (0)