mirror of
https://gitee.com/willfree/min-dev-java.git
synced 2026-10-04 19:42:01 +08:00
add test: ReadOnlyFieldTest
This commit is contained in:
1 parent
0a7ccc95a3
commit
8a2da10583
19 files changed
+1251
-966
No files matched your search
@@ -17,11 +17,18 @@ public class SignatureInfo implements TlvComponentBase, IEncodingAble {
|
||||
private SignatureType signatureType;
|
||||
private KeyLocator keyLocator;
|
||||
|
||||
public SignatureInfo(){
|
||||
signatureType=new SignatureType();
|
||||
keyLocator=new KeyLocator();
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据签名值类型创建一个 SignatureInfo
|
||||
* @param value
|
||||
*/
|
||||
public SignatureInfo(SignatureAlgorithm value){
|
||||
signatureType=new SignatureType();
|
||||
keyLocator=new KeyLocator();
|
||||
this.buildSignatureInfoBySignatureTypeValue(value);
|
||||
}
|
||||
|
||||
@@ -172,7 +179,12 @@ public class SignatureInfo implements TlvComponentBase, IEncodingAble {
|
||||
boolean findSignatureType=false;
|
||||
int elementSize=block.getSubElements().length();
|
||||
for (int i=0;i<elementSize;i++) {
|
||||
Block cacheBlock=block.getSubElements().getBlock(i);
|
||||
Block cacheBlock= null;
|
||||
try {
|
||||
cacheBlock = block.getSubElements().getBlock(i);
|
||||
} catch (BlockException e) {
|
||||
throw new ComponentException("SignatureInfo.wireDecode:"+e.getMessage());
|
||||
}
|
||||
int type= 0;
|
||||
try {
|
||||
type = cacheBlock.getType().getVlIntValue2Int();
|
||||
|
||||
Reference in new issue
Block a user