fix:attachedVerifyAndGetAllHsm throw exception with error code instead of return null

This commit is contained in:
cheney 2025-08-15 14:04:38 +08:00
parent e299efe782
commit c516397ad6

View File

@ -12411,10 +12411,8 @@ public class SydApi4j implements SydApi {
RetWrap retWrap = attachedVerifyAndGetAll(sign);
if (retWrap == null) {
return null;
return (byte[]) retWrap.get("oData");
}
return (String) retWrap.get("oData");
return (byte[]) retWrap.get("oData");
}
/**
@ -12491,7 +12489,10 @@ public class SydApi4j implements SydApi {
PacketSection error = (PacketSection) ret.get("error");
byte[] be = error.getBytes();
if ((0 != (be[0] ^ be[1]))) {
return null;
SydApiException e = new SydApiException(error.getInfo(), error.autoInt());
// println("验签失败=" + e.toString());
// return null;
throw e;
}
PacketSection info = (PacketSection) ret.get("info");