Skip to content

Commit

Permalink
attr fix
Browse files Browse the repository at this point in the history
  • Loading branch information
antonsergeyev committed Jan 4, 2024
1 parent d54e4a6 commit 63fc74d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/kz/ncanode/service/CmsService.java
Original file line number Diff line number Diff line change
Expand Up @@ -258,11 +258,11 @@ public CmsVerificationResponse verify(String signedCms, String detachedData, boo
attr = (Attribute)obj;
}

if (attr.get().getAttrValues().size() != 1) {
if (attr.getAttrValues().size() != 1) {
throw new Exception("Too many TSP tokens");
}

CMSSignedData tspCms = new CMSSignedData(attr.get().getAttrValues().getObjectAt(0).getDERObject().getEncoded());
CMSSignedData tspCms = new CMSSignedData(attr.getAttrValues().getObjectAt(0).getDERObject().getEncoded());
TimeStampTokenInfo tspi = tspService.info(tspCms).orElseThrow();

try {
Expand Down

0 comments on commit 63fc74d

Please sign in to comment.