本文整理汇总了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);
}
示例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.");
}
}
示例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);
}
}