Top Fields Constructors Methods
org.apache.pdfbox.examples.signature.validation

public Class CertInformationHelper

extends Object
Class Inheritance
Imports
java.io.IOException, java.security.MessageDigest, .NoSuchAlgorithmException, java.util.Enumeration, org.apache.commons.logging.Log, .LogFactory, org.apache.pdfbox.examples.signature.validation.CertInformationCollector.CertSignatureInformation, org.apache.pdfbox.util.Hex, org.bouncycastle.asn1.ASN1Encodable, .ASN1OctetString, .ASN1Sequence, .ASN1TaggedObject, org.bouncycastle.asn1.x509.GeneralName, .X509ObjectIdentifiers, org.bouncycastle.cert.jcajce.JcaX509ExtensionUtils

Field Summary

Modifier and TypeField and Description
private static final Log

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private static String
protected static void
getAuthorityInfoExtensionValue(byte[]
byte[] of the extension value.
extensionValue
,
CertInformationCollector.CertSignatureInformation
where to put the found values
certInfo
)

Extracts authority information access extension values from the given data.

protected static String

Returns:

first CRL- URL or null
getCrlUrlFromExtensionValue
(byte[]
to get the extension value from
extensionValue
)

Gets the first CRL URL from given extension value.

protected static String

Returns:

SHA-1 hash String
getSha1Hash
(byte[]
to be hashed
content
)

Gets the SHA-1-Hash has of given byte[]-content.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

LOGback to summary
private static final Log LOG

Constructor Detail

CertInformationHelperback to summary
private CertInformationHelper()

Method Detail

extractCrlUrlFromSequenceback to summary
private static String extractCrlUrlFromSequence(ASN1Sequence sequence)
getAuthorityInfoExtensionValueback to summary
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[]

byte[] of the extension value.

certInfo:CertInformationCollector.CertSignatureInformation

where to put the found values

Exceptions
IOException:
when there is a problem with the extensionValue
getCrlUrlFromExtensionValueback to summary
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:byte[]

to get the extension value from

Returns:String

first CRL- URL or null

Exceptions
IOException:
when there is a problem with the extensionValue
getSha1Hashback to summary
protected static String getSha1Hash(byte[] content)

Gets the SHA-1-Hash has of given byte[]-content.

Parameters
content:byte[]

to be hashed

Returns:String

SHA-1 hash String