当前位置: 首页>>代码示例>>Java>>正文


Java CommitmentTypeIndication类代码示例

本文整理汇总了Java中org.bouncycastle.asn1.esf.CommitmentTypeIndication的典型用法代码示例。如果您正苦于以下问题:Java CommitmentTypeIndication类的具体用法?Java CommitmentTypeIndication怎么用?Java CommitmentTypeIndication使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


CommitmentTypeIndication类属于org.bouncycastle.asn1.esf包,在下文中一共展示了CommitmentTypeIndication类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: checkConstruction

import org.bouncycastle.asn1.esf.CommitmentTypeIndication; //导入依赖的package包/类
private void checkConstruction(
     CommitmentTypeIndication mv,
     DERObjectIdentifier commitmenttTypeId,
     ASN1Encodable qualifier) 
     throws IOException
{
    checkStatement(mv, commitmenttTypeId, qualifier);
    
    mv = CommitmentTypeIndication.getInstance(mv);
    
    checkStatement(mv, commitmenttTypeId, qualifier);
    
    ASN1InputStream aIn = new ASN1InputStream(mv.toASN1Object().getEncoded());

    ASN1Sequence seq = (ASN1Sequence)aIn.readObject();
    
    mv = CommitmentTypeIndication.getInstance(seq);
    
    checkStatement(mv, commitmenttTypeId, qualifier);
}
 
开发者ID:credentials,项目名称:irma_future_id,代码行数:21,代码来源:CommitmentTypeIndicationUnitTest.java

示例2: checkStatement

import org.bouncycastle.asn1.esf.CommitmentTypeIndication; //导入依赖的package包/类
private void checkStatement(
    CommitmentTypeIndication cti,
    DERObjectIdentifier     commitmentTypeId,
    ASN1Encodable           qualifier)
{
    if (!cti.getCommitmentTypeId().equals(commitmentTypeId))
    {
        fail("commitmentTypeIds don't match.");
    }
    
    if (qualifier != null)
    {
        if (!cti.getCommitmentTypeQualifier().equals(qualifier))
        {
            fail("qualifiers don't match.");
        }
    }
    else if (cti.getCommitmentTypeQualifier() != null)
    {
        fail("qualifier found when none expected.");
    }
}
 
开发者ID:credentials,项目名称:irma_future_id,代码行数:23,代码来源:CommitmentTypeIndicationUnitTest.java

示例3: getCommitmentTypeIndication

import org.bouncycastle.asn1.esf.CommitmentTypeIndication; //导入依赖的package包/类
@Override
public CommitmentType getCommitmentTypeIndication() {
	final Attribute commitmentTypeIndicationAttribute = getSignedAttribute(PKCSObjectIdentifiers.id_aa_ets_commitmentType);
	if (commitmentTypeIndicationAttribute == null) {
		return null;
	}

	try {
		CommitmentType commitmentType = null;
		final ASN1Set attrValues = commitmentTypeIndicationAttribute.getAttrValues();
		final int size = attrValues.size();
		if (size > 0) {
			commitmentType = new CommitmentType();
			for (int ii = 0; ii < size; ii++) {
				if (attrValues.getObjectAt(ii) instanceof DERSequence) {
					final DERSequence derSequence = (DERSequence) attrValues.getObjectAt(ii);
					final CommitmentTypeIndication commitmentTypeIndication = CommitmentTypeIndication.getInstance(derSequence);
					final ASN1ObjectIdentifier commitmentTypeId = commitmentTypeIndication.getCommitmentTypeId();
					commitmentType.addIdentifier(commitmentTypeId.getId());
				} else {
					LOG.warn("Unsupported type for CommitmentType : " + attrValues.getObjectAt(ii).getClass());
				}
			}
		}
		return commitmentType;
	} catch (Exception e) {
		throw new DSSException("Error when dealing with CommitmentTypeIndication!", e);
	}
}
 
开发者ID:esig,项目名称:dss,代码行数:30,代码来源:CAdESSignature.java


注:本文中的org.bouncycastle.asn1.esf.CommitmentTypeIndication类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。