Examples of TSAClientBouncyCastle


Examples of com.itextpdf.text.pdf.security.TSAClientBouncyCastle

            verification.addVerification(signature, ocsps, crls, certificates);
        }

        // Timestamp the document.
        PdfSignatureAppearance appearance = stamper.getSignatureAppearance();
        TSAClientBouncyCastle client = new TSAClientBouncyCastle(
            timestampURL,
            timestampUser,
            timestampPassword,
            TSAClientBouncyCastle.DEFAULTTOKENSIZE * 2,
            "SHA-512");
View Full Code Here

Examples of com.itextpdf.text.pdf.security.TSAClientBouncyCastle

    for(int i = 0; i < certificationChain.length; i++)
    {
      X509Certificate cert = (X509Certificate) certificationChain[i];
      String tsaUrl = CertificateUtil.getTSAURL(cert);
      if(tsaUrl != null)
        return new TSAClientBouncyCastle(tsaUrl);
    }
    return null;
  }
View Full Code Here

Examples of com.itextpdf.text.pdf.security.TSAClientBouncyCastle

    info.page = 1;
    engine.setAppearanceInfo(info);

//      TSAClient tsa = engine.getTSAfromSmartcard();
    // Usa Digistamp per ottenere un account di test per il rilascio di timestamp
    TSAClient tsa = new TSAClientBouncyCastle("http://tsatest1.digistamp.com/tsa", "12345678", "12345678");
    engine.setTsaClient(tsa);

    engine.setUseInternetCrl(true);
    engine.signDocument(input, output);
  }
View Full Code Here

Examples of com.lowagie.text.pdf.TSAClientBouncyCastle

        }
      }
      byte sh[] = sgn.getAuthenticatedAttributeBytes(hash, cal, ocsp);
      sgn.update(sh, 0, sh.length);

      TSAClientBouncyCastle tsc = null;
      if (options.isTimestampX() && !StringUtils.isEmpty(options.getTsaUrl())) {
        options.log("console.creatingTsaClient");
        tsc = new TSAClientBouncyCastle(options.getTsaUrl(), StringUtils.emptyNull(options.getTsaUser()),
            StringUtils.emptyNull(options.getTsaPasswd()));
        tsc.setProxy(tmpProxy);
        final String policyOid = options.getTsaPolicy();
        if (StringUtils.hasLength(policyOid)) {
          options.log("console.settingTsaPolicy", policyOid);
          tsc.setPolicy(policyOid);
        }
      }
      byte[] encodedSig = sgn.getEncodedPKCS7(hash, cal, tsc, ocsp);

      if (contentEstimated + 2 < encodedSig.length) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.