Java Xades签名创建和验证端到端工作示例?

Java Xades签名创建和验证端到端工作示例?,java,xades4j,xades,Java,Xades4j,Xades,我需要在Java项目中创建和验证Xades B-T签名。我找到了DSS和xades4j项目,但无法设置它们。例如,使用DSS创建签名很容易,但在验证过程中,我会遇到各种错误 即使DSS的官方验证示例也不起作用,simpleReport.getErrors()给出了: [The certificate path is not trusted!, The result of the LTV validation process is not acceptable to continue the pr

我需要在Java项目中创建和验证Xades B-T签名。我找到了DSS和xades4j项目,但无法设置它们。例如,使用DSS创建签名很容易,但在验证过程中,我会遇到各种错误

即使DSS的官方验证示例也不起作用,
simpleReport.getErrors()
给出了:

[The certificate path is not trusted!, The result of the LTV validation process is not acceptable to continue the process!, The result of the timestamps validation process is not conclusive!, The certificate chain for timestamp is not trusted, there is no trusted anchor.]
我需要一个端到端的工作示例,包括:

  • 自签名密钥和证书创建(我还没有受信任的证书)
  • 使用密钥和证书生成Xades签名
  • 使用密钥和证书进行Xades签名验证