From 28fa18278c1f3a87722d5e8b78f581526a30bb38 Mon Sep 17 00:00:00 2001 From: Yuuta Liang Date: Sat, 14 Oct 2023 05:35:17 +0800 Subject: Fix lint Signed-off-by: Yuuta Liang --- src/main/model/pki/cert/TbsCertificate.java | 49 +++++++++++++++-------------- 1 file changed, 26 insertions(+), 23 deletions(-) (limited to 'src/main/model/pki/cert/TbsCertificate.java') 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 * - * + *

* 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 { -- cgit v1.2.3