Package org.bouncycastle.asn1.x509
Class Extension
java.lang.Object
org.bouncycastle.asn1.ASN1Object
org.bouncycastle.asn1.x509.Extension
- All Implemented Interfaces:
ASN1Encodable,Encodable
an object for the elements in the X.509 V3 extension block.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ASN1ObjectIdentifierthe algorithm identifier for the alternative digital signature algorithm.static final ASN1ObjectIdentifieralternative signature shall be created by the issuer using its alternative private key.static final ASN1ObjectIdentifierAudit identity extension in attribute certificates.static final ASN1ObjectIdentifierAuthority Info Accessstatic final ASN1ObjectIdentifierAuthority Key Identifierstatic final ASN1ObjectIdentifierBasic Constraintsstatic final ASN1ObjectIdentifierBiometricInfostatic final ASN1ObjectIdentifierCertificate Issuerstatic final ASN1ObjectIdentifierCertificate Policiesstatic final ASN1ObjectIdentifierCRL Distribution Pointsstatic final ASN1ObjectIdentifierCRL Numberstatic final ASN1ObjectIdentifierDelta CRL indicatorstatic final ASN1ObjectIdentifierExpired Certificates on CRL extensionstatic final ASN1ObjectIdentifierExtended Key Usagestatic final ASN1ObjectIdentifierFreshest CRLstatic final ASN1ObjectIdentifierInhibit Any Policystatic final ASN1ObjectIdentifierHold Instruction Codestatic final ASN1ObjectIdentifierInvalidity Datestatic final ASN1ObjectIdentifierIssuer Alternative Namestatic final ASN1ObjectIdentifierIssuing Distribution Pointstatic final ASN1ObjectIdentifierKey Usagestatic final ASN1ObjectIdentifierLogo Typestatic final ASN1ObjectIdentifierName Constraintsstatic final ASN1ObjectIdentifierNoRevAvail extension in attribute certificates.static final ASN1ObjectIdentifierPolicy Constraintsstatic final ASN1ObjectIdentifierPolicy Mappingsstatic final ASN1ObjectIdentifierPrivate Key Usage Periodstatic final ASN1ObjectIdentifierQCStatementsstatic final ASN1ObjectIdentifierReason codestatic final ASN1ObjectIdentifierSubject Alternative Namestatic final ASN1ObjectIdentifierthe subject’s alternative public key informationstatic final ASN1ObjectIdentifierSubject Directory Attributesstatic final ASN1ObjectIdentifierSubject Info Accessstatic final ASN1ObjectIdentifierSubject Key Identifierstatic final ASN1ObjectIdentifierTargetInformation extension in attribute certificates. -
Constructor Summary
ConstructorsConstructorDescriptionExtension(ASN1ObjectIdentifier extnId, boolean critical, byte[] value) Constructor using a byte[] for the value.Extension(ASN1ObjectIdentifier extnId, boolean critical, ASN1OctetString value) Constructor using an OCTET STRING for the value.Extension(ASN1ObjectIdentifier extnId, ASN1Boolean critical, ASN1OctetString value) Constructor using an ASN1Boolean and an OCTET STRING for the value. -
Method Summary
Modifier and TypeMethodDescriptionstatic Extensioncreate(ASN1ObjectIdentifier extnId, boolean critical, ASN1Encodable value) Helper method to create an extension from any ASN.1 encodable object.booleanstatic ExtensiongetInstance(Object obj) inthashCode()booleanMethod providing a primitive representation of this object suitable for encoding.Methods inherited from class org.bouncycastle.asn1.ASN1Object
encodeTo, encodeTo, getEncoded, getEncoded, hasEncodedTagValue
-
Field Details
-
subjectDirectoryAttributes
Subject Directory Attributes -
subjectKeyIdentifier
Subject Key Identifier -
keyUsage
Key Usage -
privateKeyUsagePeriod
Private Key Usage Period -
subjectAlternativeName
Subject Alternative Name -
issuerAlternativeName
Issuer Alternative Name -
basicConstraints
Basic Constraints -
cRLNumber
CRL Number -
reasonCode
Reason code -
instructionCode
Hold Instruction Code -
invalidityDate
Invalidity Date -
deltaCRLIndicator
Delta CRL indicator -
issuingDistributionPoint
Issuing Distribution Point -
certificateIssuer
Certificate Issuer -
nameConstraints
Name Constraints -
cRLDistributionPoints
CRL Distribution Points -
certificatePolicies
Certificate Policies -
policyMappings
Policy Mappings -
authorityKeyIdentifier
Authority Key Identifier -
policyConstraints
Policy Constraints -
extendedKeyUsage
Extended Key Usage -
freshestCRL
Freshest CRL -
inhibitAnyPolicy
Inhibit Any Policy -
authorityInfoAccess
Authority Info Access -
subjectInfoAccess
Subject Info Access -
logoType
Logo Type -
biometricInfo
BiometricInfo -
qCStatements
QCStatements -
auditIdentity
Audit identity extension in attribute certificates. -
noRevAvail
NoRevAvail extension in attribute certificates. -
targetInformation
TargetInformation extension in attribute certificates. -
expiredCertsOnCRL
Expired Certificates on CRL extension -
subjectAltPublicKeyInfo
the subject’s alternative public key information -
altSignatureAlgorithm
the algorithm identifier for the alternative digital signature algorithm. -
altSignatureValue
alternative signature shall be created by the issuer using its alternative private key.
-
-
Constructor Details
-
Extension
Constructor using an ASN1Boolean and an OCTET STRING for the value.- Parameters:
extnId- the OID associated with this extension.critical- will evaluate to true if the extension is critical, false otherwise.value- the extension's value wrapped in an OCTET STRING.
-
Extension
Constructor using a byte[] for the value.- Parameters:
extnId- the OID associated with this extension.critical- true if the extension is critical, false otherwise.value- the extension's value as a byte[] to be wrapped in an OCTET STRING.
-
Extension
Constructor using an OCTET STRING for the value.- Parameters:
extnId- the OID associated with this extension.critical- true if the extension is critical, false otherwise.value- the extension's value wrapped in an OCTET STRING.
-
-
Method Details
-
create
public static Extension create(ASN1ObjectIdentifier extnId, boolean critical, ASN1Encodable value) throws IOException Helper method to create an extension from any ASN.1 encodable object.- Parameters:
extnId- the OID associated with this extension.critical- true if the extension is critical, false otherwise.value- the value to be encoded into the extension's OCTET STRING.- Returns:
- a new Extension with the encoding of value in the bytes of the extension's OCTET STRING.
- Throws:
IOException- if the value cannot be encoded into bytes.
-
getInstance
-
getExtnId
-
isCritical
public boolean isCritical() -
getExtnValue
-
getParsedValue
-
hashCode
public int hashCode()- Overrides:
hashCodein classASN1Object
-
equals
- Overrides:
equalsin classASN1Object
-
toASN1Primitive
Description copied from class:ASN1ObjectMethod providing a primitive representation of this object suitable for encoding.- Specified by:
toASN1Primitivein interfaceASN1Encodable- Specified by:
toASN1Primitivein classASN1Object- Returns:
- a primitive representation of this object.
-