Codota Logo
OnlineTSPSource.setDataLoader
Code IndexAdd Codota to your IDE (free)

How to use
setDataLoader
method
in
eu.europa.esig.dss.client.tsp.OnlineTSPSource

Best Java code snippets using eu.europa.esig.dss.client.tsp.OnlineTSPSource.setDataLoader (Showing top 10 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: 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(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 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
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.tspOnlineTSPSourcesetDataLoader

Javadoc

Set the DataLoader to use for querying the TSP server.

Popular methods of OnlineTSPSource

  • <init>
    Build a OnlineTSPSource that will query the specified URL
  • 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

  • Running tasks concurrently on multiple threads
  • onRequestPermissionsResult (Fragment)
  • getSupportFragmentManager (FragmentActivity)
    Return the FragmentManager for interacting with fragments associated with this activity.
  • getApplicationContext (Context)
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • JLabel (javax.swing)
  • Join (org.hibernate.mapping)
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