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


Java TSPSource类代码示例

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


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

示例1: testValidator

import eu.europa.esig.dss.x509.tsp.TSPSource; //导入依赖的package包/类
@Test
public void testValidator() throws Exception {

	TSPSource tspSource = getGoodTsa();

	byte[] data = new byte[] { 1, 2, 3 };
	TimeStampToken timeStampResponse = tspSource.getTimeStampResponse(DigestAlgorithm.SHA256, DSSUtils.digest(DigestAlgorithm.SHA256, data));

	CMSTimestampValidator validator = new CMSTimestampValidator(new InMemoryDocument(timeStampResponse.getEncoded()));
	validator.setTimestampedData(new InMemoryDocument(data));
	validator.setCertificateVerifier(getCompleteCertificateVerifier());

	assertTrue(Utils.isCollectionEmpty(validator.getSignatures()));

	TimestampToken timestamp = validator.getTimestamp();
	assertNotNull(timestamp);
	assertTrue(timestamp.isMessageImprintDataFound());
	assertTrue(timestamp.isMessageImprintDataIntact());
}
 
开发者ID:esig,项目名称:dss,代码行数:20,代码来源:CMSTimestampValidatorTest.java

示例2: tspSource

import eu.europa.esig.dss.x509.tsp.TSPSource; //导入依赖的package包/类
@Bean
public TSPSource tspSource() {
	OnlineTSPSource onlineTSPSource = new OnlineTSPSource();
	onlineTSPSource.setDataLoader(timestampDataLoader());
	onlineTSPSource.setTspServer(tsaUrl);
	return onlineTSPSource;
}
 
开发者ID:esig,项目名称:dss-demonstrations,代码行数:8,代码来源:DSSBeanConfig.java

示例3: TimestampService

import eu.europa.esig.dss.x509.tsp.TSPSource; //导入依赖的package包/类
/**
 * Basic constructor, new CertificatePool created
 *
 * @param tspSource
 *            The TSPSource to be used for the Timestamp generation
 */
public TimestampService(final TSPSource tspSource) {
	if (tspSource == null) {
		throw new NullPointerException();
	}
	this.tspSource = tspSource;
	certificatePool = new CertificatePool();
	xPathQueryHolder = new XPathQueryHolder();
}
 
开发者ID:esig,项目名称:dss,代码行数:15,代码来源:TimestampService.java

示例4: CAdESSignatureExtension

import eu.europa.esig.dss.x509.tsp.TSPSource; //导入依赖的package包/类
/**
 * @param signatureTsa
 * @param onlyLastCMSSignature
 *            true if only the last signature must be extended, otherwise all signatures are extended
 */
public CAdESSignatureExtension(final TSPSource signatureTsa, final boolean onlyLastCMSSignature) {

	this.signatureTsa = signatureTsa;
	this.onlyLastCMSSignature = onlyLastCMSSignature;
	if (signatureTsa == null) {
		throw new DSSConfigurationException(DSSConfigurationException.MSG.CONFIGURE_TSP_SERVER);
	}
}
 
开发者ID:esig,项目名称:dss,代码行数:14,代码来源:CAdESSignatureExtension.java

示例5: timestamp

import eu.europa.esig.dss.x509.tsp.TSPSource; //导入依赖的package包/类
@Override
public void timestamp(final DSSDocument document, final OutputStream signedStream, final PAdESSignatureParameters parameters, final TSPSource tspSource)
		throws DSSException {

	final DigestAlgorithm timestampDigestAlgorithm = parameters.getSignatureTimestampParameters().getDigestAlgorithm();
	InputStream inputStream = document.openStream();
	final byte[] digest = digest(inputStream, parameters, timestampDigestAlgorithm);
	Utils.closeQuietly(inputStream);
	final TimeStampToken timeStampToken = tspSource.getTimeStampResponse(timestampDigestAlgorithm, digest);
	final byte[] encoded = DSSASN1Utils.getEncoded(timeStampToken);
	inputStream = document.openStream();
	sign(inputStream, encoded, signedStream, parameters, timestampDigestAlgorithm);
	Utils.closeQuietly(inputStream);
}
 
开发者ID:esig,项目名称:dss,代码行数:15,代码来源:PdfBoxDocTimeStampService.java

示例6: getSignatureTsa

import eu.europa.esig.dss.x509.tsp.TSPSource; //导入依赖的package包/类
/**
 * @return the TSA used for the signature-time-stamp attribute
 */
public TSPSource getSignatureTsa() {

	return signatureTsa;
}
 
开发者ID:esig,项目名称:dss,代码行数:8,代码来源:CAdESSignatureExtension.java

示例7: getTimeStampAttributeValue

import eu.europa.esig.dss.x509.tsp.TSPSource; //导入依赖的package包/类
protected ASN1Object getTimeStampAttributeValue(TSPSource tspSource, byte[] message, CAdESSignatureParameters parameters) {

		final DigestAlgorithm timestampDigestAlgorithm = parameters.getSignatureTimestampParameters().getDigestAlgorithm();
		ASN1Object signatureTimeStampValue = getTimeStampAttributeValue(tspSource, message, timestampDigestAlgorithm);
		return signatureTimeStampValue;
	}
 
开发者ID:esig,项目名称:dss,代码行数:7,代码来源:CAdESSignatureExtension.java

示例8: CAdESLevelBaselineLT

import eu.europa.esig.dss.x509.tsp.TSPSource; //导入依赖的package包/类
public CAdESLevelBaselineLT(TSPSource signatureTsa, CertificateVerifier certificateVerifier, boolean onlyLastSigner) {
	super(signatureTsa, onlyLastSigner);
	this.certificateVerifier = certificateVerifier;
	cadesProfileT = new CAdESLevelBaselineT(signatureTsa, onlyLastSigner);
}
 
开发者ID:esig,项目名称:dss,代码行数:6,代码来源:CAdESLevelBaselineLT.java

示例9: CAdESLevelBaselineT

import eu.europa.esig.dss.x509.tsp.TSPSource; //导入依赖的package包/类
public CAdESLevelBaselineT(TSPSource signatureTsa, boolean onlyLastCMSSignature) {
	super(signatureTsa, onlyLastCMSSignature);
}
 
开发者ID:esig,项目名称:dss,代码行数:4,代码来源:CAdESLevelBaselineT.java

示例10: CAdESLevelBaselineLTA

import eu.europa.esig.dss.x509.tsp.TSPSource; //导入依赖的package包/类
public CAdESLevelBaselineLTA(TSPSource signatureTsa, CertificateVerifier certificateVerifier, boolean onlyLastSigner) {
	super(signatureTsa, onlyLastSigner);
	cadesProfileLT = new CAdESLevelBaselineLT(signatureTsa, certificateVerifier, onlyLastSigner);
	this.certificateVerifier = certificateVerifier;
}
 
开发者ID:esig,项目名称:dss,代码行数:6,代码来源:CAdESLevelBaselineLTA.java

示例11: setTspSource

import eu.europa.esig.dss.x509.tsp.TSPSource; //导入依赖的package包/类
@Override
public void setTspSource(final TSPSource tspSource) {
	this.tspSource = tspSource;
}
 
开发者ID:esig,项目名称:dss,代码行数:5,代码来源:AbstractSignatureService.java

示例12: PAdESLevelBaselineT

import eu.europa.esig.dss.x509.tsp.TSPSource; //导入依赖的package包/类
public PAdESLevelBaselineT(TSPSource tspSource) {
	this.tspSource = tspSource;
}
 
开发者ID:esig,项目名称:dss,代码行数:4,代码来源:PAdESLevelBaselineT.java

示例13: PAdESLevelBaselineLT

import eu.europa.esig.dss.x509.tsp.TSPSource; //导入依赖的package包/类
PAdESLevelBaselineLT(final TSPSource tspSource, final CertificateVerifier certificateVerifier) {
	this.certificateVerifier = certificateVerifier;
	this.tspSource = tspSource;
}
 
开发者ID:esig,项目名称:dss,代码行数:5,代码来源:PAdESLevelBaselineLT.java

示例14: PAdESLevelBaselineLTA

import eu.europa.esig.dss.x509.tsp.TSPSource; //导入依赖的package包/类
public PAdESLevelBaselineLTA(TSPSource tspSource, CertificateVerifier certificateVerifier) {
	padesLevelBaselineLT = new PAdESLevelBaselineLT(tspSource, certificateVerifier);
	padesLevelBaselineT = new PAdESLevelBaselineT(tspSource);
	this.certificateVerifier = certificateVerifier;
}
 
开发者ID:esig,项目名称:dss,代码行数:6,代码来源:PAdESLevelBaselineLTA.java

示例15: ContentTimestampGenerator

import eu.europa.esig.dss.x509.tsp.TSPSource; //导入依赖的package包/类
/**
 * @param tspSource       the timestamping authority
 * @param certificatePool
 */
public ContentTimestampGenerator(final TSPSource tspSource, final CertificatePool certificatePool) {
	this.tspSource = tspSource;
	this.certificatePool = certificatePool;
}
 
开发者ID:esig,项目名称:dss,代码行数:9,代码来源:ContentTimestampGenerator.java


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