Browse Source

Change urls to itextpdf.com

Autoported commit.
Original commit hash: [4fa42c3e8]
Manual files:
io/src/test/java/com/itextpdf/io/resolver/resource/DefaultResourceRetrieverTest.java
sign/src/main/java/com/itextpdf/signatures/validation/xml/XmlSaxProcessor.java
pull/39/merge
Guust Ysebie 7 days ago
parent
commit
f1f53ba366
  1. 82
      itext.tests/itext.sign.tests/itext/signatures/LtvVerificationTest.cs
  2. 14
      itext/itext.sign/itext/signatures/validation/xml/IDefaultXmlHandler.cs
  3. 2
      port-hash

82
itext.tests/itext.sign.tests/itext/signatures/LtvVerificationTest.cs

@ -42,7 +42,7 @@ namespace iText.Signatures {
private const String SIG_FIELD_NAME = "Signature1";
private const String CRL_DISTRIBUTION_POINT = "https://example.com";
private const String CRL_DISTRIBUTION_POINT = "https://itextpdf.com";
private static readonly String CERT_FOLDER_PATH = iText.Test.TestUtil.GetParentProjectDirectory(NUnit.Framework.TestContext
.CurrentContext.TestDirectory) + "/resources/itext/signatures/certs/";
@ -312,136 +312,136 @@ namespace iText.Signatures {
}
[NUnit.Framework.Test]
[LogMessage("Added CRL url: https://example.com", LogLevel = LogLevelConstants.INFO)]
[LogMessage("Checking CRL: https://example.com", LogLevel = LogLevelConstants.INFO)]
[LogMessage("Added CRL found at: https://example.com", LogLevel = LogLevelConstants.INFO)]
[LogMessage("Added CRL url: https://itextpdf.com", LogLevel = LogLevelConstants.INFO)]
[LogMessage("Checking CRL: https://itextpdf.com", LogLevel = LogLevelConstants.INFO)]
[LogMessage("Added CRL found at: https://itextpdf.com", LogLevel = LogLevelConstants.INFO)]
public virtual void ValidateSigNameSigningOcspCrlYesTest() {
ValidateOptionLevelInclusion(CRL_DISTRIBUTION_POINT, LtvVerification.CertificateOption.SIGNING_CERTIFICATE
, LtvVerification.Level.OCSP_CRL, LtvVerification.CertificateInclusion.YES, true);
}
[NUnit.Framework.Test]
[LogMessage("Added CRL url: https://example.com", LogLevel = LogLevelConstants.INFO)]
[LogMessage("Added CRL url: https://itextpdf.com", LogLevel = LogLevelConstants.INFO)]
public virtual void ValidateSigNameSigningOcspYesTest() {
ValidateOptionLevelInclusion(CRL_DISTRIBUTION_POINT, LtvVerification.CertificateOption.SIGNING_CERTIFICATE
, LtvVerification.Level.OCSP, LtvVerification.CertificateInclusion.YES, false);
}
[NUnit.Framework.Test]
[LogMessage("Added CRL url: https://example.com", LogLevel = LogLevelConstants.INFO)]
[LogMessage("Checking CRL: https://example.com", LogLevel = LogLevelConstants.INFO)]
[LogMessage("Added CRL found at: https://example.com", LogLevel = LogLevelConstants.INFO)]
[LogMessage("Added CRL url: https://itextpdf.com", LogLevel = LogLevelConstants.INFO)]
[LogMessage("Checking CRL: https://itextpdf.com", LogLevel = LogLevelConstants.INFO)]
[LogMessage("Added CRL found at: https://itextpdf.com", LogLevel = LogLevelConstants.INFO)]
public virtual void ValidateSigNameSigningCrlYesTest() {
ValidateOptionLevelInclusion(CRL_DISTRIBUTION_POINT, LtvVerification.CertificateOption.SIGNING_CERTIFICATE
, LtvVerification.Level.CRL, LtvVerification.CertificateInclusion.YES, true);
}
[NUnit.Framework.Test]
[LogMessage("Added CRL url: https://example.com", LogLevel = LogLevelConstants.INFO)]
[LogMessage("Checking CRL: https://example.com", LogLevel = LogLevelConstants.INFO)]
[LogMessage("Added CRL found at: https://example.com", LogLevel = LogLevelConstants.INFO)]
[LogMessage("Added CRL url: https://itextpdf.com", LogLevel = LogLevelConstants.INFO)]
[LogMessage("Checking CRL: https://itextpdf.com", LogLevel = LogLevelConstants.INFO)]
[LogMessage("Added CRL found at: https://itextpdf.com", LogLevel = LogLevelConstants.INFO)]
public virtual void ValidateSigNameSigningOcspOptionalCrlYesTest() {
ValidateOptionLevelInclusion(CRL_DISTRIBUTION_POINT, LtvVerification.CertificateOption.SIGNING_CERTIFICATE
, LtvVerification.Level.OCSP_OPTIONAL_CRL, LtvVerification.CertificateInclusion.YES, true);
}
[NUnit.Framework.Test]
[LogMessage("Added CRL url: https://example.com", LogLevel = LogLevelConstants.INFO)]
[LogMessage("Checking CRL: https://example.com", LogLevel = LogLevelConstants.INFO)]
[LogMessage("Added CRL found at: https://example.com", LogLevel = LogLevelConstants.INFO)]
[LogMessage("Added CRL url: https://itextpdf.com", LogLevel = LogLevelConstants.INFO)]
[LogMessage("Checking CRL: https://itextpdf.com", LogLevel = LogLevelConstants.INFO)]
[LogMessage("Added CRL found at: https://itextpdf.com", LogLevel = LogLevelConstants.INFO)]
public virtual void ValidateSigNameSigningOcspCrlNoTest() {
ValidateOptionLevelInclusion(CRL_DISTRIBUTION_POINT, LtvVerification.CertificateOption.SIGNING_CERTIFICATE
, LtvVerification.Level.OCSP_CRL, LtvVerification.CertificateInclusion.NO, true);
}
[NUnit.Framework.Test]
[LogMessage("Added CRL url: https://example.com", LogLevel = LogLevelConstants.INFO)]
[LogMessage("Added CRL url: https://itextpdf.com", LogLevel = LogLevelConstants.INFO)]
public virtual void ValidateSigNameSigningOcspNoTest() {
ValidateOptionLevelInclusion(CRL_DISTRIBUTION_POINT, LtvVerification.CertificateOption.SIGNING_CERTIFICATE
, LtvVerification.Level.OCSP, LtvVerification.CertificateInclusion.NO, false);
}
[NUnit.Framework.Test]
[LogMessage("Added CRL url: https://example.com", LogLevel = LogLevelConstants.INFO)]
[LogMessage("Checking CRL: https://example.com", LogLevel = LogLevelConstants.INFO)]
[LogMessage("Added CRL found at: https://example.com", LogLevel = LogLevelConstants.INFO)]
[LogMessage("Added CRL url: https://itextpdf.com", LogLevel = LogLevelConstants.INFO)]
[LogMessage("Checking CRL: https://itextpdf.com", LogLevel = LogLevelConstants.INFO)]
[LogMessage("Added CRL found at: https://itextpdf.com", LogLevel = LogLevelConstants.INFO)]
public virtual void ValidateSigNameSigningCrlNoTest() {
ValidateOptionLevelInclusion(CRL_DISTRIBUTION_POINT, LtvVerification.CertificateOption.SIGNING_CERTIFICATE
, LtvVerification.Level.CRL, LtvVerification.CertificateInclusion.NO, true);
}
[NUnit.Framework.Test]
[LogMessage("Added CRL url: https://example.com", LogLevel = LogLevelConstants.INFO)]
[LogMessage("Checking CRL: https://example.com", LogLevel = LogLevelConstants.INFO)]
[LogMessage("Added CRL found at: https://example.com", LogLevel = LogLevelConstants.INFO)]
[LogMessage("Added CRL url: https://itextpdf.com", LogLevel = LogLevelConstants.INFO)]
[LogMessage("Checking CRL: https://itextpdf.com", LogLevel = LogLevelConstants.INFO)]
[LogMessage("Added CRL found at: https://itextpdf.com", LogLevel = LogLevelConstants.INFO)]
public virtual void ValidateSigNameSigningOcspOptionalCrlNoTest() {
ValidateOptionLevelInclusion(CRL_DISTRIBUTION_POINT, LtvVerification.CertificateOption.SIGNING_CERTIFICATE
, LtvVerification.Level.OCSP_OPTIONAL_CRL, LtvVerification.CertificateInclusion.NO, true);
}
[NUnit.Framework.Test]
[LogMessage("Added CRL url: https://example.com", LogLevel = LogLevelConstants.INFO)]
[LogMessage("Checking CRL: https://example.com", LogLevel = LogLevelConstants.INFO, Count = 2)]
[LogMessage("Added CRL found at: https://example.com", LogLevel = LogLevelConstants.INFO, Count = 2)]
[LogMessage("Added CRL url: https://itextpdf.com", LogLevel = LogLevelConstants.INFO)]
[LogMessage("Checking CRL: https://itextpdf.com", LogLevel = LogLevelConstants.INFO, Count = 2)]
[LogMessage("Added CRL found at: https://itextpdf.com", LogLevel = LogLevelConstants.INFO, Count = 2)]
public virtual void ValidateSigNameWholeChainOcspCrlYesTest() {
ValidateOptionLevelInclusion(CRL_DISTRIBUTION_POINT, LtvVerification.CertificateOption.WHOLE_CHAIN, LtvVerification.Level
.OCSP_CRL, LtvVerification.CertificateInclusion.YES, true);
}
[NUnit.Framework.Test]
[LogMessage("Added CRL url: https://example.com", LogLevel = LogLevelConstants.INFO)]
[LogMessage("Checking CRL: https://example.com", LogLevel = LogLevelConstants.INFO, Count = 2)]
[LogMessage("Added CRL found at: https://example.com", LogLevel = LogLevelConstants.INFO, Count = 2)]
[LogMessage("Added CRL url: https://itextpdf.com", LogLevel = LogLevelConstants.INFO)]
[LogMessage("Checking CRL: https://itextpdf.com", LogLevel = LogLevelConstants.INFO, Count = 2)]
[LogMessage("Added CRL found at: https://itextpdf.com", LogLevel = LogLevelConstants.INFO, Count = 2)]
public virtual void ValidateSigNameWholeChainOcspOptionalCrlYesTest() {
ValidateOptionLevelInclusion(CRL_DISTRIBUTION_POINT, LtvVerification.CertificateOption.WHOLE_CHAIN, LtvVerification.Level
.OCSP_OPTIONAL_CRL, LtvVerification.CertificateInclusion.YES, true);
}
[NUnit.Framework.Test]
[LogMessage("Added CRL url: https://example.com", LogLevel = LogLevelConstants.INFO)]
[LogMessage("Added CRL url: https://itextpdf.com", LogLevel = LogLevelConstants.INFO)]
public virtual void ValidateSigNameWholeChainOcspYesTest() {
ValidateOptionLevelInclusion(CRL_DISTRIBUTION_POINT, LtvVerification.CertificateOption.WHOLE_CHAIN, LtvVerification.Level
.OCSP, LtvVerification.CertificateInclusion.YES, false);
}
[NUnit.Framework.Test]
[LogMessage("Added CRL url: https://example.com", LogLevel = LogLevelConstants.INFO)]
[LogMessage("Checking CRL: https://example.com", LogLevel = LogLevelConstants.INFO, Count = 2)]
[LogMessage("Added CRL found at: https://example.com", LogLevel = LogLevelConstants.INFO, Count = 2)]
[LogMessage("Added CRL url: https://itextpdf.com", LogLevel = LogLevelConstants.INFO)]
[LogMessage("Checking CRL: https://itextpdf.com", LogLevel = LogLevelConstants.INFO, Count = 2)]
[LogMessage("Added CRL found at: https://itextpdf.com", LogLevel = LogLevelConstants.INFO, Count = 2)]
public virtual void ValidateSigNameWholeChainCrlYesTest() {
ValidateOptionLevelInclusion(CRL_DISTRIBUTION_POINT, LtvVerification.CertificateOption.WHOLE_CHAIN, LtvVerification.Level
.CRL, LtvVerification.CertificateInclusion.YES, true);
}
[NUnit.Framework.Test]
[LogMessage("Added CRL url: https://example.com", LogLevel = LogLevelConstants.INFO)]
[LogMessage("Checking CRL: https://example.com", LogLevel = LogLevelConstants.INFO, Count = 2)]
[LogMessage("Added CRL found at: https://example.com", LogLevel = LogLevelConstants.INFO, Count = 2)]
[LogMessage("Added CRL url: https://itextpdf.com", LogLevel = LogLevelConstants.INFO)]
[LogMessage("Checking CRL: https://itextpdf.com", LogLevel = LogLevelConstants.INFO, Count = 2)]
[LogMessage("Added CRL found at: https://itextpdf.com", LogLevel = LogLevelConstants.INFO, Count = 2)]
public virtual void ValidateSigNameWholeChainOcspCrlNoTest() {
ValidateOptionLevelInclusion(CRL_DISTRIBUTION_POINT, LtvVerification.CertificateOption.WHOLE_CHAIN, LtvVerification.Level
.OCSP_CRL, LtvVerification.CertificateInclusion.NO, true);
}
[NUnit.Framework.Test]
[LogMessage("Added CRL url: https://example.com", LogLevel = LogLevelConstants.INFO)]
[LogMessage("Checking CRL: https://example.com", LogLevel = LogLevelConstants.INFO, Count = 2)]
[LogMessage("Added CRL found at: https://example.com", LogLevel = LogLevelConstants.INFO, Count = 2)]
[LogMessage("Added CRL url: https://itextpdf.com", LogLevel = LogLevelConstants.INFO)]
[LogMessage("Checking CRL: https://itextpdf.com", LogLevel = LogLevelConstants.INFO, Count = 2)]
[LogMessage("Added CRL found at: https://itextpdf.com", LogLevel = LogLevelConstants.INFO, Count = 2)]
public virtual void ValidateSigNameWholeChainOcspOptionalCrlNoTest() {
ValidateOptionLevelInclusion(CRL_DISTRIBUTION_POINT, LtvVerification.CertificateOption.WHOLE_CHAIN, LtvVerification.Level
.OCSP_OPTIONAL_CRL, LtvVerification.CertificateInclusion.NO, true);
}
[NUnit.Framework.Test]
[LogMessage("Added CRL url: https://example.com", LogLevel = LogLevelConstants.INFO)]
[LogMessage("Added CRL url: https://itextpdf.com", LogLevel = LogLevelConstants.INFO)]
public virtual void ValidateSigNameWholeChainOcspNoTest() {
ValidateOptionLevelInclusion(CRL_DISTRIBUTION_POINT, LtvVerification.CertificateOption.WHOLE_CHAIN, LtvVerification.Level
.OCSP, LtvVerification.CertificateInclusion.NO, false);
}
[NUnit.Framework.Test]
[LogMessage("Added CRL url: https://example.com", LogLevel = LogLevelConstants.INFO)]
[LogMessage("Checking CRL: https://example.com", LogLevel = LogLevelConstants.INFO, Count = 2)]
[LogMessage("Added CRL found at: https://example.com", LogLevel = LogLevelConstants.INFO, Count = 2)]
[LogMessage("Added CRL url: https://itextpdf.com", LogLevel = LogLevelConstants.INFO)]
[LogMessage("Checking CRL: https://itextpdf.com", LogLevel = LogLevelConstants.INFO, Count = 2)]
[LogMessage("Added CRL found at: https://itextpdf.com", LogLevel = LogLevelConstants.INFO, Count = 2)]
public virtual void ValidateSigNameWholeChainCrlNoTest() {
ValidateOptionLevelInclusion(CRL_DISTRIBUTION_POINT, LtvVerification.CertificateOption.WHOLE_CHAIN, LtvVerification.Level
.CRL, LtvVerification.CertificateInclusion.NO, true);

14
itext/itext.sign/itext/signatures/validation/xml/IDefaultXmlHandler.cs

@ -24,11 +24,25 @@ using System;
using System.Collections.Generic;
namespace iText.Signatures.Validation.Xml {
/// <summary>Interface for handling XML elements during SAX processing.</summary>
public interface IDefaultXmlHandler {
/// <summary>Called when a start element is encountered in the XML document.</summary>
/// <param name="uri">the namespace URI of the element</param>
/// <param name="localName">the local name of the element</param>
/// <param name="qName">the qualified name of the element</param>
/// <param name="attributes">a map of attributes associated with the element</param>
void StartElement(String uri, String localName, String qName, Dictionary<String, String> attributes);
/// <summary>Called when an end element is encountered in the XML document.</summary>
/// <param name="uri">the namespace URI of the element</param>
/// <param name="localName">the local name of the element</param>
/// <param name="qName">the qualified name of the element</param>
void EndElement(String uri, String localName, String qName);
/// <summary>Called when character data is encountered within an element.</summary>
/// <param name="ch">the character array containing the data</param>
/// <param name="start">the start index of the data in the array</param>
/// <param name="length">the length of the data</param>
void Characters(char[] ch, int start, int length);
}
}

2
port-hash

@ -1 +1 @@
3e0301e80c4c333f7b3927d20c25714e117032b9
4fa42c3e8a93f076b8d0ce7d31cfd88704348ac4
Loading…
Cancel
Save