Codota Logo
OnlineTSPSource.<init>
Code IndexAdd Codota to your IDE (free)

How to use
eu.europa.esig.dss.client.tsp.OnlineTSPSource
constructor

Best Java code snippets using eu.europa.esig.dss.client.tsp.OnlineTSPSource.<init> (Showing top 11 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
LocalDateTime l =
  • Codota Iconnew LocalDateTime()
  • Codota IconLocalDateTime.now()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseLocalDateTime(text)
  • Smart code suggestions by Codota
}
origin: open-eid/SiVa

  private TSPSource getTspSource(String tspSourceUrl) {
    OnlineTSPSource tspSource = new OnlineTSPSource(tspSourceUrl);
    SKTimestampDataLoader dataLoader = new SKTimestampDataLoader();
    tspSource.setDataLoader(dataLoader);
    return tspSource;
  }
}
origin: open-eid/digidoc4j

private OnlineTSPSource createTimeStampProviderSource(SignatureProfile profile) {
 OnlineTSPSource source = new OnlineTSPSource(this.configuration.getTspSource());
 SkDataLoader loader = SkDataLoader.timestamp(this.configuration);
 loader.setUserAgent(Helper.createBDocUserAgent(profile));
 source.setDataLoader(loader);
 return source;
}
origin: esig/dss

@Test
public void testWithoutNonce() {
  OnlineTSPSource tspSource = new OnlineTSPSource(TSA_URL);
  byte[] digest = DSSUtils.digest(DigestAlgorithm.SHA1, "Hello world".getBytes());
  TimeStampToken timeStampResponse = tspSource.getTimeStampResponse(DigestAlgorithm.SHA1, digest);
  assertNotNull(timeStampResponse);
}
origin: open-eid/digidoc4j

private static OnlineTSPSource defineOnlineTSPSource(Configuration configuration) {
 OnlineTSPSource source = new OnlineTSPSource();
 if (configuration == null) {
  configuration = Configuration.getInstance();
 }
 source.setTspServer(configuration.getTspSource());
 SkDataLoader loader = SkDataLoader.timestamp(configuration);
 loader.setUserAgent(Helper.createBDocAsicSUserAgent());
 source.setDataLoader(loader);
 return source;
}
origin: open-eid/digidoc4j

protected void setTimeStampProviderSource() {
 OnlineTSPSource tspSource = new OnlineTSPSource(this.getTspSource(configuration));
 SkDataLoader dataLoader = SkDataLoader.timestamp(configuration);
 dataLoader.setUserAgent(Helper.createBDocUserAgent(this.signatureParameters.getSignatureProfile()));
 tspSource.setDataLoader(dataLoader);
 this.facade.setTspSource(tspSource);
}
origin: open-eid/digidoc4j

protected void setTimeStampProviderSource() {
 Configuration configuration = this.getConfiguration();
 OnlineTSPSource tspSource = new OnlineTSPSource(this.getTspSource(configuration));
 SkDataLoader dataLoader = SkDataLoader.timestamp(configuration);
 dataLoader.setUserAgent(Helper.createBDocUserAgent(this.signatureParameters.getSignatureProfile()));
 tspSource.setDataLoader(dataLoader);
 this.facade.setTspSource(tspSource);
}
origin: esig/dss

@Test
public void testWithNativeHTTPDataLoader() {
  OnlineTSPSource tspSource = new OnlineTSPSource(TSA_URL);
  tspSource.setDataLoader(new NativeHTTPDataLoader());
  byte[] digest = DSSUtils.digest(DigestAlgorithm.SHA1, "Hello world".getBytes());
  TimeStampToken timeStampResponse = tspSource.getTimeStampResponse(DigestAlgorithm.SHA1, digest);
  assertNotNull(timeStampResponse);
}
origin: esig/dss

@Test(expected = DSSException.class)
public void testNotTSA() {
  OnlineTSPSource tspSource = new OnlineTSPSource();
  tspSource.setDataLoader(new TimestampDataLoader());
  tspSource.setTspServer("http://www.google.com");
  byte[] digest = DSSUtils.digest(DigestAlgorithm.SHA1, "Hello world".getBytes());
  tspSource.getTimeStampResponse(DigestAlgorithm.SHA1, digest);
}
origin: esig/dss

@Test
public void testWithCommonDataLoader() {
  OnlineTSPSource tspSource = new OnlineTSPSource(TSA_URL);
  tspSource.setDataLoader(new CommonsDataLoader());
  byte[] digest = DSSUtils.digest(DigestAlgorithm.SHA1, "Hello world".getBytes());
  TimeStampToken timeStampResponse = tspSource.getTimeStampResponse(DigestAlgorithm.SHA1, digest);
  assertNotNull(timeStampResponse);
}
origin: esig/dss

@Test
public void testWithTimestampDataLoader() {
  OnlineTSPSource tspSource = new OnlineTSPSource("http://demo.sk.ee/tsa/");
  tspSource.setPolicyOid("0.4.0.2023.1.1");
  tspSource.setDataLoader(new TimestampDataLoader()); // content-type is different
  byte[] digest = DSSUtils.digest(DigestAlgorithm.SHA512, "Hello world".getBytes());
  TimeStampToken timeStampResponse = tspSource.getTimeStampResponse(DigestAlgorithm.SHA512, digest);
  assertNotNull(timeStampResponse);
}
origin: esig/dss

@Test
public void testWithNonce() {
  OnlineTSPSource tspSource = new OnlineTSPSource(TSA_URL);
  tspSource.setDataLoader(new NativeHTTPDataLoader());
  tspSource.setNonceSource(new SecureRandomNonceSource());
  byte[] digest = DSSUtils.digest(DigestAlgorithm.SHA1, "Hello world".getBytes());
  TimeStampToken timeStampResponse = tspSource.getTimeStampResponse(DigestAlgorithm.SHA1, digest);
  assertNotNull(timeStampResponse);
}
eu.europa.esig.dss.client.tspOnlineTSPSource<init>

Javadoc

The default constructor for OnlineTSPSource.

Popular methods of OnlineTSPSource

  • setDataLoader
    Set the DataLoader to use for querying the TSP server.
  • getTimeStampResponse
  • setTspServer
    Set the URL of the TSA
  • setNonceSource
    Set the NonceSource to use for querying the TSP server.
  • setPolicyOid
    Set the request policy

Popular in Java

  • Creating JSON documents from java classes using gson
  • startActivity (Activity)
  • orElseThrow (Optional)
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • InetAddress (java.net)
    This class represents an Internet Protocol (IP) address. An IP address is either a 32-bit or 128-bit
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • List (java.util)
    A List is a collection which maintains an ordering for its elements. Every element in the List has a
  • Notification (javax.management)
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now