Class C509CertificationRequestTemplate
java.lang.Object
org.bouncycastle.cbor.c509.C509CertificationRequestTemplate
A C509 certification request template (Section 4.4 of
draft-ietf-cose-cbor-encoded-cert-20), returned by an EST server in response to a
GET /csrattrs request to tell the client what its certification request should
contain:
C509CertificationRequestTemplate = [ c509CertificationRequestTemplateType: int, c509CertificationRequestType: [+ int] / undefined, subjectSignatureAlgorithm: [+ AlgorithmIdentifier] / undefined, subject: NameTemplate / undefined, subjectPublicKeyAlgorithm: [+ AlgorithmIdentifier] / undefined, subjectPublicKey: undefined, extensionsRequest: ExtensionsTemplate / undefined, ]The CBOR simple value undefined marks the fields the client is expected to fill in - represented here as null returns from the accessors.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAn ExtensionTemplate group (Section 4.4): an extension with an "optional" flag and a prescribed or partial value.static classAn RDNAttributeTemplate group (Section 4.4): an attribute type with its minimum and maximum number of occurrences and an optional prescribed value. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intSimple C509 Certification Request Template (Section 8.5). -
Constructor Summary
ConstructorsConstructorDescriptionC509CertificationRequestTemplate(int templateType, int[] requestTypes, C509AlgorithmIdentifier[] signatureAlgorithms, C509CertificationRequestTemplate.RDNAttributeTemplate[] subjectTemplate, C509AlgorithmIdentifier[] publicKeyAlgorithms, C509CertificationRequestTemplate.ExtensionTemplate[] extensionsTemplate) Base constructor. -
Method Summary
Modifier and TypeMethodDescriptionint[]Return the certification request types the server accepts, or null when the client chooses.byte[]Return the complete CBOR encoding of this template.Return the extensions template, or null when the client chooses the extension request.getInstance(byte[] encoding) Parse a C509 certification request template from its CBOR encoding.Return the subject public key algorithms the server accepts, or null when the client chooses.Return the subject signature algorithms the server accepts, or null when the client chooses.Return the subject name template, or null when the client provides the subject.int
-
Field Details
-
TYPE_SIMPLE
public static final int TYPE_SIMPLESimple C509 Certification Request Template (Section 8.5).- See Also:
-
-
Constructor Details
-
C509CertificationRequestTemplate
public C509CertificationRequestTemplate(int templateType, int[] requestTypes, C509AlgorithmIdentifier[] signatureAlgorithms, C509CertificationRequestTemplate.RDNAttributeTemplate[] subjectTemplate, C509AlgorithmIdentifier[] publicKeyAlgorithms, C509CertificationRequestTemplate.ExtensionTemplate[] extensionsTemplate) Base constructor. Null array arguments stand for the CBOR undefined - fields the client is expected to provide.
-
-
Method Details
-
getInstance
Parse a C509 certification request template from its CBOR encoding.- Throws:
IOException
-
getEncoded
Return the complete CBOR encoding of this template.- Throws:
IOException
-
getTemplateType
public int getTemplateType() -
getCertificationRequestTypes
public int[] getCertificationRequestTypes()Return the certification request types the server accepts, or null when the client chooses. -
getSubjectSignatureAlgorithms
Return the subject signature algorithms the server accepts, or null when the client chooses. -
getSubjectTemplate
Return the subject name template, or null when the client provides the subject. -
getSubjectPublicKeyAlgorithms
Return the subject public key algorithms the server accepts, or null when the client chooses. -
getExtensionsTemplate
Return the extensions template, or null when the client chooses the extension request.
-