aboutsummaryrefslogtreecommitdiff
path: root/src/main/model/pki/cert/TbsCertificate.java
diff options
context:
space:
mode:
authorYuuta Liang <yuutaw@students.cs.ubc.ca>2023-10-14 05:35:17 +0800
committerYuuta Liang <yuutaw@students.cs.ubc.ca>2023-10-14 05:35:17 +0800
commit28fa18278c1f3a87722d5e8b78f581526a30bb38 (patch)
tree2f23f6e2e222a78f40809ec37e8b28a29cba3d3c /src/main/model/pki/cert/TbsCertificate.java
parent0bcc057e741af3fbc108f42b75f9d42f48f6a51e (diff)
downloadjca-28fa18278c1f3a87722d5e8b78f581526a30bb38.tar
jca-28fa18278c1f3a87722d5e8b78f581526a30bb38.tar.gz
jca-28fa18278c1f3a87722d5e8b78f581526a30bb38.tar.bz2
jca-28fa18278c1f3a87722d5e8b78f581526a30bb38.zip
Fix lint
Signed-off-by: Yuuta Liang <yuutaw@students.cs.ubc.ca>
Diffstat (limited to 'src/main/model/pki/cert/TbsCertificate.java')
-rw-r--r--src/main/model/pki/cert/TbsCertificate.java49
1 files changed, 26 insertions, 23 deletions
diff --git a/src/main/model/pki/cert/TbsCertificate.java b/src/main/model/pki/cert/TbsCertificate.java
index ce228af..84cf0ba 100644
--- a/src/main/model/pki/cert/TbsCertificate.java
+++ b/src/main/model/pki/cert/TbsCertificate.java
@@ -1,6 +1,9 @@
package model.pki.cert;
-import model.asn1.*;
+import model.asn1.ASN1Object;
+import model.asn1.Int;
+import model.asn1.Tag;
+import model.asn1.TagClass;
import model.asn1.exceptions.ParseException;
import model.asn1.parsing.BytesReader;
import model.pki.AlgorithmIdentifier;
@@ -45,7 +48,7 @@ import java.util.stream.Stream;
* ID id-at-uniqueIdentifier }
* UniqueIdentifier ::= BIT STRING
* </pre>
- *
+ * <p>
* NOTE that subjectUniqueIdentifier and issuerUniqueIdentifier are not supported.
*/
public class TbsCertificate extends ASN1Object {
@@ -103,21 +106,21 @@ public class TbsCertificate extends ASN1Object {
/**
* EFFECTS: Init with the given parameters. For tag and parentTag, see {@link ASN1Object}.
* REQUIRES:
- * - Version must be V1, V2, or V3.
- * - {issuer,subject}UniqueIdentifier could be null.
- * - If {issuer,subject}UniqueIdentifier presents, version must be V2 or V3.
- * - Extensions could be null.
- * - If extensions presents, version must be V3.
- * - The signature should be valid.
- * - Field and Desired Tags:
- * version CONTEXT SPECIFIC 0 (EXPLICIT), INTEGER, OPTIONAL DEFAULT v1
- * serialNumber INTEGER
- * signature SEQUENCE
- * issuer SEQUENCE
- * validity SEQUENCE
- * subject SEQUENCE
- * subjectPublicKeyInfo SEQUENCE
- * extensions CONTEXT SPECIFIC 3 (EXPLICIT), SEQUENCE, OPTIONAL
+ * - Version must be V1, V2, or V3.
+ * - {issuer,subject}UniqueIdentifier could be null.
+ * - If {issuer,subject}UniqueIdentifier presents, version must be V2 or V3.
+ * - Extensions could be null.
+ * - If extensions presents, version must be V3.
+ * - The signature should be valid.
+ * - Field and Desired Tags:
+ * version CONTEXT SPECIFIC 0 (EXPLICIT), INTEGER, OPTIONAL DEFAULT v1
+ * serialNumber INTEGER
+ * signature SEQUENCE
+ * issuer SEQUENCE
+ * validity SEQUENCE
+ * subject SEQUENCE
+ * subjectPublicKeyInfo SEQUENCE
+ * extensions CONTEXT SPECIFIC 3 (EXPLICIT), SEQUENCE, OPTIONAL
*/
public TbsCertificate(Tag tag, Tag parentTag,
final Int version,
@@ -141,12 +144,12 @@ public class TbsCertificate extends ASN1Object {
/**
* EFFECTS: Parse input DER.
- * Throws {@link ASN1Object} if invalid:
- * - Any fields missing
- * - Any fields having an incorrect parent / inner tag (as seen in the ASN.1 definition)
- * - Any fields with encoding instructions that violate implicit / explicit encoding rules
- * - extensions are specified, but the version is v1 or v2
- * - Other issues found during parsing the object, like early EOF (see {@link ASN1Object})
+ * Throws {@link ASN1Object} if invalid:
+ * - Any fields missing
+ * - Any fields having an incorrect parent / inner tag (as seen in the ASN.1 definition)
+ * - Any fields with encoding instructions that violate implicit / explicit encoding rules
+ * - extensions are specified, but the version is v1 or v2
+ * - Other issues found during parsing the object, like early EOF (see {@link ASN1Object})
* MODIFIES: this, encoded
*/
public TbsCertificate(BytesReader encoded, boolean hasParentTag) throws ParseException {