Skip to content

Commit 6eb4a11

Browse files
committed
TSP: distinct exception messages for sign cert v2
1 parent f0ea4c0 commit 6eb4a11

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎pkix/src/main/j2me/org/bouncycastle/tsp/TimeStampToken.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,14 +138,14 @@ public TimeStampToken(CMSSignedData signedData)
138138

139139
if (attr.getAttrValues().size() < 1)
140140
{
141-
throw new TSPException("signing certificate attribute MUST contain at least one AttributeValue");
141+
throw new TSPException("signing certificate v2 attribute MUST contain at least one AttributeValue");
142142
}
143143

144144
SigningCertificateV2 signCertV2 = SigningCertificateV2.getInstance(attr.getAttrValues().getObjectAt(0));
145145

146146
if (signCertV2.getCerts().length < 1)
147147
{
148-
throw new TSPException("signing certificate attribute MUST contain at least one ESSCertID");
148+
throw new TSPException("signing certificate v2 attribute MUST contain at least one ESSCertIDv2");
149149
}
150150

151151
this.certID = new CertID(ESSCertIDv2.getInstance(signCertV2.getCerts()[0]));

‎pkix/src/main/java/org/bouncycastle/tsp/TimeStampToken.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,14 +139,14 @@ public TimeStampToken(CMSSignedData signedData)
139139

140140
if (attr.getAttrValues().size() < 1)
141141
{
142-
throw new TSPException("signing certificate attribute MUST contain at least one AttributeValue");
142+
throw new TSPException("signing certificate v2 attribute MUST contain at least one AttributeValue");
143143
}
144144

145145
SigningCertificateV2 signCertV2 = SigningCertificateV2.getInstance(attr.getAttrValues().getObjectAt(0));
146146

147147
if (signCertV2.getCerts().length < 1)
148148
{
149-
throw new TSPException("signing certificate attribute MUST contain at least one ESSCertID");
149+
throw new TSPException("signing certificate v2 attribute MUST contain at least one ESSCertIDv2");
150150
}
151151

152152
this.certID = ESSCertIDv2.getInstance(signCertV2.getCerts()[0]);

0 commit comments

Comments
 (0)