Class CertInformationHelper
- java.lang.Object
-
- org.apache.pdfbox.examples.signature.validation.CertInformationHelper
-
public class CertInformationHelper extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private static org.apache.commons.logging.LogLOG
-
Constructor Summary
Constructors Modifier Constructor Description privateCertInformationHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static java.lang.StringextractCrlUrlFromSequence(org.bouncycastle.asn1.ASN1Sequence sequence)protected static voidgetAuthorityInfoExtensionValue(byte[] extensionValue, CertInformationCollector.CertSignatureInformation certInfo)Extracts authority information access extension values from the given data.protected static java.lang.StringgetCrlUrlFromExtensionValue(byte[] extensionValue)Gets the first CRL URL from given extension value.protected static java.lang.StringgetSha1Hash(byte[] content)Gets the SHA-1-Hash has of given byte[]-content.
-
-
-
Method Detail
-
getSha1Hash
protected static java.lang.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 java.io.IOExceptionExtracts 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:
java.io.IOException- when there is a problem with the extensionValue
-
getCrlUrlFromExtensionValue
protected static java.lang.String getCrlUrlFromExtensionValue(byte[] extensionValue) throws java.io.IOExceptionGets 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:
java.io.IOException- when there is a problem with the extensionValue
-
extractCrlUrlFromSequence
private static java.lang.String extractCrlUrlFromSequence(org.bouncycastle.asn1.ASN1Sequence sequence)
-
-