add test: ReadOnlyFieldTest

This commit is contained in:
free will committed 2021-03-25 17:41:13 +08:00
1 parent 0a7ccc95a3
commit 8a2da10583
19 files changed
+1251 -966

No files matched your search

+13 -1
View File
@@ -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();