public class PDSeedValueCertificate extends Object implements COSObjectable
Modifier and Type | Field and Description |
---|---|
static int |
FLAG_ISSUER
A Ff flag.
|
static int |
FLAG_KEY_USAGE
A Ff flag.
|
static int |
FLAG_OID
A Ff flag.
|
static int |
FLAG_SUBJECT
A Ff flag.
|
static int |
FLAG_SUBJECT_DN
A Ff flag.
|
static int |
FLAG_URL
A Ff flag.
|
Constructor and Description |
---|
PDSeedValueCertificate()
Default constructor.
|
PDSeedValueCertificate(COSDictionary dict)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addIssuer(byte[] issuer)
array of bytes containing DER-encoded X.509v3 certificates of acceptable issuers.
|
void |
addKeyUsage(char digitalSignature,
char nonRepudiation,
char keyEncipherment,
char dataEncipherment,
char keyAgreement,
char keyCertSign,
char cRLSign,
char encipherOnly,
char decipherOnly)
works like
addKeyUsage(String) but enters each character separately |
void |
addKeyUsage(String keyUsageExtension)
(Optional; PDF 1.7) specifies an acceptable key-usage extension that must be presennt in the
signing certificate for works like
setKeyUsage(List) but takes only one string |
void |
addOID(byte[] oid)
works like
setOID(List) but for one object |
void |
addSubject(byte[] subject)
(Optional) byte array containing DER-encoded X.509v3 certificate that is acceptable for
signing. works like
setSubject(List) but one byte array |
COSDictionary |
getCOSObject()
Convert this standard java object to a COS dictionary.
|
List<byte[]> |
getIssuer()
Returns list of array of bytes of DER-encoded X.509v3 certificates
|
List<String> |
getKeyUsage()
Returns list of key usages of certificate strings where each string is 9 characters long and
each character is one of these values {0, 1, X} 0 for must not set, 1 for must set, X for
don't care. each index in the string represents a key usage:
digitalSignature
non-Repudiation
keyEncipherment
dataEncipherment
keyAgreement
keyCertSign
cRLSign
encipherOnly
decipherOnly
|
List<byte[]> |
getOID()
Returns A list of array of bytes that contain Object Identifiers (OIDs) of the certificate
policies that must be present in the signing certificate
|
List<byte[]> |
getSubject()
Returns list of byte arrays that contains DER-encoded X.509v3 certificates
|
List<Map<String,String>> |
getSubjectDN()
Returns list of maps that contains subject distinguished names like [(cn: John Doe, o: Doe),
(cn: John Smith)] both keys are typically of the form 'cn', 'o', 'email', '2.5.4.43'; and
values are text strings.
|
String |
getURL()
returns String of the URL
|
String |
getURLType()
A name indicating the usage of the URL entry.
|
boolean |
isIssuerRequired() |
boolean |
isKeyUsageRequired() |
boolean |
isOIDRequired() |
boolean |
isSubjectDNRequired() |
boolean |
isSubjectRequired() |
boolean |
isURLRequired() |
void |
removeIssuer(byte[] issuer)
Removes an issuer from the issuers list
|
void |
removeKeyUsage(String keyUsageExtension)
Removes a key usage extension
|
void |
removeOID(byte[] oid)
removes an OID from the list
|
void |
removeSubject(byte[] subject)
removes a subject from the list
|
void |
setIssuer(List<byte[]> issuers)
(Optional) A list of array of bytes containing DER-encoded X.509v3 certificates of acceptable
issuers.
|
void |
setIssuerRequired(boolean flag)
set true if Issuer shall be required as a constraint on signature.
|
void |
setKeyUsage(List<String> keyUsageExtensions)
(Optional; PDF 1.7) A List of ASCII strings, where each string specifies an acceptable
key-usage extension that must be present in the signing certificate.
|
void |
setKeyUsageRequired(boolean flag)
set true if KeyUsage shall be required as a constraint on signature.
|
void |
setOID(List<byte[]> oidByteStrings)
(Optional) A list of byte arrays that contain Object Identifiers (OIDs) of the certificate
policies that must be present in the signing certificate.
|
void |
setOIDRequired(boolean flag)
set true if OID shall be required as a constraint on signature.
|
void |
setSubject(List<byte[]> subjects)
(Optional) A list of byte arrays containing DER-encoded X.509v3 certificates that are
acceptable for signing. if
Subject is not null and
isSubjectRequired() is true then the subject
constraint is enforced on the subjects in this array subjects. |
void |
setSubjectDN(List<Map<String,String>> subjectDN)
(Optional; PDF 1.7) A list of maps, where each map contains key value pairs, that specify the
Subject Distinguished Name (DN) that must be present within the certificate for it to be
acceptable for signing.
|
void |
setSubjectDNRequired(boolean flag)
set true if subject DN shall be required as a constraint on signature.
|
void |
setSubjectRequired(boolean flag)
set true if subject shall be required as a constraint on signature.
|
void |
setURL(String url)
(Optional) A URL, the use for which is defined by the URLType entry.
|
void |
setURLRequired(boolean flag)
set true if URL shall be required as a constraint on signature.
|
void |
setURLType(String urlType)
(Optional; PDF 1.7) A name indicating the usage of the URL entry.
|
public static final int FLAG_SUBJECT
public static final int FLAG_ISSUER
public static final int FLAG_OID
public static final int FLAG_SUBJECT_DN
public static final int FLAG_KEY_USAGE
public static final int FLAG_URL
public PDSeedValueCertificate()
public PDSeedValueCertificate(COSDictionary dict)
dict
- The certificate seed value dictionary.public COSDictionary getCOSObject()
getCOSObject
in interface COSObjectable
public boolean isSubjectRequired()
public void setSubjectRequired(boolean flag)
flag
- if true, the specified Subject shall be enforced as a constraint.public boolean isIssuerRequired()
public void setIssuerRequired(boolean flag)
flag
- if true, the specified Issuer shall be enforced as a constraint.public boolean isOIDRequired()
public void setOIDRequired(boolean flag)
flag
- if true, the specified OID shall be enforced as a constraint.public boolean isSubjectDNRequired()
public void setSubjectDNRequired(boolean flag)
flag
- if true, the specified Subject DN shall be enforced as a constraint.public boolean isKeyUsageRequired()
public void setKeyUsageRequired(boolean flag)
flag
- if true, the specified KeyUsage shall be enforced as a constraint.public boolean isURLRequired()
public void setURLRequired(boolean flag)
flag
- if true, the specified URL shall be enforced as a constraint.public List<byte[]> getSubject()
public void setSubject(List<byte[]> subjects)
isSubjectRequired()
is true then the subject
constraint is enforced on the subjects in this array subjects.subjects
- list of byte arrays containing DER-encoded X.509v3 certificates that are
acceptable for signing.public void addSubject(byte[] subject)
setSubject(List)
but one byte arraysubject
- byte array containing DER-encoded X.509v3 certificatepublic void removeSubject(byte[] subject)
subject
- byte array containing DER-encoded X.509v3 certificatepublic List<Map<String,String>> getSubjectDN()
public void setSubjectDN(List<Map<String,String>> subjectDN)
subjectDN
- list of maps that contains subject distinguished namespublic List<String> getKeyUsage()
public void setKeyUsage(List<String> keyUsageExtensions)
keyUsageExtensions
- list of ASCII strings that consists only of {0, 1, X}public void addKeyUsage(String keyUsageExtension)
setKeyUsage(List)
but takes only one stringkeyUsageExtension
- String that consist only of {0, 1, X}public void addKeyUsage(char digitalSignature, char nonRepudiation, char keyEncipherment, char dataEncipherment, char keyAgreement, char keyCertSign, char cRLSign, char encipherOnly, char decipherOnly)
addKeyUsage(String)
but enters each character separatelydigitalSignature
- char that is one of {0, 1, X}nonRepudiation
- char that is one of {0, 1, X}keyEncipherment
- char that is one of {0, 1, X}dataEncipherment
- char that is one of {0, 1, X}keyAgreement
- char that is one of {0, 1, X}keyCertSign
- char that is one of {0, 1, X}cRLSign
- char that is one of {0, 1, X}encipherOnly
- char that is one of {0, 1, X}decipherOnly
- char that is one of {0, 1, X}public void removeKeyUsage(String keyUsageExtension)
keyUsageExtension
- ASCII string that consists of {0, 1, X}public List<byte[]> getIssuer()
public void setIssuer(List<byte[]> issuers)
issuers
- A list of byte array containing DER-encoded X.509v3 certificatespublic void addIssuer(byte[] issuer)
issuer
- A byte array containing DER-encoded X.509v3 certificatepublic void removeIssuer(byte[] issuer)
issuer
- A byte array containing DER-encoded X.509v3 certificatepublic List<byte[]> getOID()
public void setOID(List<byte[]> oidByteStrings)
oidByteStrings
- list of byte arrays that contain OIDspublic void addOID(byte[] oid)
setOID(List)
but for one objectoid
- public void removeOID(byte[] oid)
oid
- public String getURL()
public void setURL(String url)
url
- String of the URLpublic String getURLType()
public void setURLType(String urlType)
urlType
- String of the urlTypeCopyright © 2002–2017 The Apache Software Foundation. All rights reserved.