Class CertInformationHelper

java.lang.Object
org.apache.pdfbox.examples.signature.validation.CertInformationHelper

public class CertInformationHelper extends Object
  • Field Details

    • LOG

      private static final org.apache.commons.logging.Log LOG
  • Constructor Details

    • CertInformationHelper

      private CertInformationHelper()
  • Method Details

    • getSha1Hash

      protected static String getSha1Hash(byte[] content)
      Gets the SHA-1-Hash has of given byte[]-content.
      Parameters:
      content - to be hashed
      Returns:
      SHA-1 hash String
    • getAuthorityInfoExtensionValue

      protected static void getAuthorityInfoExtensionValue(byte[] extensionValue, CertInformationCollector.CertSignatureInformation certInfo) throws IOException
      Extracts authority information access extension values from the given data. The Data structure has to be implemented as described in RFC 2459, 4.2.2.1.
      Parameters:
      extensionValue - byte[] of the extension value.
      certInfo - where to put the found values
      Throws:
      IOException - when there is a problem with the extensionValue
    • getCrlUrlFromExtensionValue

      protected static String getCrlUrlFromExtensionValue(byte[] extensionValue) throws IOException
      Gets the first CRL URL from given extension value. Structure has to be built as in 4.2.1.14 CRL Distribution Points of RFC 2459.
      Parameters:
      extensionValue - to get the extension value from
      Returns:
      first CRL- URL or null
      Throws:
      IOException - when there is a problem with the extensionValue
    • extractCrlUrlFromSequence

      private static String extractCrlUrlFromSequence(org.bouncycastle.asn1.ASN1Sequence sequence)