• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java QCStatement类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: checkConstruction

import org.bouncycastle.asn1.x509.qualified.QCStatement; //导入依赖的package包/类
private void checkConstruction(
     QCStatement mv,
     DERObjectIdentifier statementId,
     ASN1Encodable statementInfo) 
     throws IOException
{
    checkStatement(mv, statementId, statementInfo);
    
    mv = QCStatement.getInstance(mv);
    
    checkStatement(mv, statementId, statementInfo);
    
    ASN1InputStream aIn = new ASN1InputStream(mv.toASN1Object().getEncoded());

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


示例2: checkStatement

import org.bouncycastle.asn1.x509.qualified.QCStatement; //导入依赖的package包/类
private void checkStatement(
    QCStatement         qcs,
    DERObjectIdentifier statementId,
    ASN1Encodable       statementInfo)
    throws IOException
{
    if (!qcs.getStatementId().equals(statementId))
    {
        fail("statementIds don't match.");
    }
    
    if (statementInfo != null)
    {
        if (!qcs.getStatementInfo().equals(statementInfo))
        {
            fail("statementInfos don't match.");
        }
    }
    else if (qcs.getStatementInfo() != null)
    {
        fail("statementInfo found when none expected.");
    }
}
 
开发者ID:credentials,项目名称:irma_future_id,代码行数:24,代码来源:QCStatementUnitTest.java


示例3: getQCStatementsIdList

import org.bouncycastle.asn1.x509.qualified.QCStatement; //导入依赖的package包/类
/**
 * Get the list of all QCStatement Ids that are present in the certificate.
 * (As per ETSI EN 319 412-5 V2.1.1)
 * 
 * @param x509Certificate
 * @return
 */
public static List<String> getQCStatementsIdList(final CertificateToken certToken) {
	final List<String> extensionIdList = new ArrayList<String>();
	final byte[] qcStatement = certToken.getCertificate().getExtensionValue(Extension.qCStatements.getId());
	if (qcStatement != null) {
		final ASN1Sequence seq = getAsn1SequenceFromDerOctetString(qcStatement);
		// Sequence of QCStatement
		for (int ii = 0; ii < seq.size(); ii++) {
			final QCStatement statement = QCStatement.getInstance(seq.getObjectAt(ii));
			extensionIdList.add(statement.getStatementId().getId());
		}
	}
	return extensionIdList;
}
 
开发者ID:esig,项目名称:dss,代码行数:21,代码来源:DSSASN1Utils.java


示例4: getQCTypesIdList

import org.bouncycastle.asn1.x509.qualified.QCStatement; //导入依赖的package包/类
/**
 * Get the list of all QCType Ids that are present in the certificate.
 * (As per ETSI EN 319 412-5 V2.1.1)
 * 
 * @param certToken
 * @return
 */
public static List<String> getQCTypesIdList(final CertificateToken certToken) {
	final List<String> qcTypesIdList = new ArrayList<String>();
	final byte[] qcStatement = certToken.getCertificate().getExtensionValue(Extension.qCStatements.getId());
	if (qcStatement != null) {
		final ASN1Sequence seq = getAsn1SequenceFromDerOctetString(qcStatement);
		// Sequence of QCStatement
		for (int ii = 0; ii < seq.size(); ii++) {
			final QCStatement statement = QCStatement.getInstance(seq.getObjectAt(ii));
			if (QC_TYPE_STATEMENT_OID.equals(statement.getStatementId().getId())) {
				final ASN1Encodable qcTypeInfo1 = statement.getStatementInfo();
				if (qcTypeInfo1 instanceof ASN1Sequence) {
					final ASN1Sequence qcTypeInfo = (ASN1Sequence) qcTypeInfo1;
					for (int jj = 0; jj < qcTypeInfo.size(); jj++) {
						final ASN1Encodable e1 = qcTypeInfo.getObjectAt(jj);
						if (e1 instanceof ASN1ObjectIdentifier) {
							final ASN1ObjectIdentifier oid = (ASN1ObjectIdentifier) e1;
							qcTypesIdList.add(oid.getId());
						} else {
							throw new IllegalStateException("ASN1Sequence in QcTypes does not contain ASN1ObjectIdentifer, but " + e1.getClass().getName());
						}
					}
				} else {
					throw new IllegalStateException("QcTypes not an ASN1Sequence, but " + qcTypeInfo1.getClass().getName());
				}
			}
		}
	}

	return qcTypesIdList;
}
 
开发者ID:esig,项目名称:dss,代码行数:38,代码来源:DSSASN1Utils.java


示例5: check

import org.bouncycastle.asn1.x509.qualified.QCStatement; //导入依赖的package包/类
@Override
public void check(X509Certificate certificate) throws TrustLinkerResultException, Exception {
	byte[] extensionValue = certificate.getExtensionValue(Extension.qCStatements.getId());
	if (null == extensionValue) {
		throw new TrustLinkerResultException(TrustLinkerResultReason.CONSTRAINT_VIOLATION,
				"missing QCStatements extension");
	}
	DEROctetString oct = (DEROctetString) (new ASN1InputStream(new ByteArrayInputStream(extensionValue))
			.readObject());
	ASN1Sequence qcStatements = (ASN1Sequence) new ASN1InputStream(oct.getOctets()).readObject();
	Enumeration<?> qcStatementEnum = qcStatements.getObjects();
	boolean qcCompliance = false;
	boolean qcSSCD = false;
	while (qcStatementEnum.hasMoreElements()) {
		QCStatement qcStatement = QCStatement.getInstance(qcStatementEnum.nextElement());
		ASN1ObjectIdentifier statementId = qcStatement.getStatementId();
		LOG.debug("statement Id: " + statementId.getId());
		if (QCStatement.id_etsi_qcs_QcCompliance.equals(statementId)) {
			qcCompliance = true;
		}
		if (QCStatement.id_etsi_qcs_QcSSCD.equals(statementId)) {
			qcSSCD = true;
		}
	}

	if (null != this.qcComplianceFilter) {
		if (qcCompliance != this.qcComplianceFilter) {
			LOG.error("qcCompliance QCStatements error");
			throw new TrustLinkerResultException(TrustLinkerResultReason.CONSTRAINT_VIOLATION,
					"QCStatements not matching");
		}
	}

	if (null != this.qcSSCDFilter) {
		if (qcSSCD != this.qcSSCDFilter) {
			LOG.error("qcSSCD QCStatements error");
			throw new TrustLinkerResultException(TrustLinkerResultReason.CONSTRAINT_VIOLATION,
					"QCStatements not matching");
		}
	}
}
 
开发者ID:e-Contract,项目名称:jtrust,代码行数:42,代码来源:QCStatementsCertificateConstraint.java


示例6: QcStatementOption

import org.bouncycastle.asn1.x509.qualified.QCStatement; //导入依赖的package包/类
public QcStatementOption(QCStatement statement) {
    this.statement = ParamUtil.requireNonNull("statement", statement);
    this.statementId = null;
    this.monetaryValueOption = null;
}
 
开发者ID:xipki,项目名称:xipki,代码行数:6,代码来源:QcStatementOption.java


示例7: statement

import org.bouncycastle.asn1.x509.qualified.QCStatement; //导入依赖的package包/类
public QCStatement statement() {
    return statement;
}
 
开发者ID:xipki,项目名称:xipki,代码行数:4,代码来源:QcStatementOption.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java RowMapper类代码示例发布时间:2022-05-22
下一篇:
Java RpcClientConfigurationConstants类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap