Top Description Fields Constructors Methods
org.bouncycastle.asn1.cmp

public Class PKIHeader

extends ASN1Object
Class Inheritance
Imports
java.util.Enumeration, org.bouncycastle.asn1.ASN1Encodable, .ASN1EncodableVector, .ASN1GeneralizedTime, .ASN1Integer, .ASN1Object, .ASN1OctetString, .ASN1Primitive, .ASN1Sequence, .ASN1TaggedObject, .ASN1Util, .DERSequence, .DERTaggedObject, org.bouncycastle.asn1.x500.X500Name, org.bouncycastle.asn1.x509.AlgorithmIdentifier, .GeneralName

PKIHeader ::= SEQUENCE { pvno INTEGER { cmp1999(1), cmp2000(2) }, sender GeneralName, -- identifies the sender recipient GeneralName, -- identifies the intended recipient messageTime [0] GeneralizedTime OPTIONAL, -- time of production of this message (used when sender -- believes that the transport will be "suitable"; i.e., -- that the time will still be meaningful upon receipt) protectionAlg [1] AlgorithmIdentifier OPTIONAL, -- algorithm used for calculation of protection bits senderKID [2] KeyIdentifier OPTIONAL, recipKID [3] KeyIdentifier OPTIONAL, -- to identify specific keys used for protection transactionID [4] OCTET STRING OPTIONAL, -- identifies the transaction; i.e., this will be the same in -- corresponding request, response, certConf, and PKIConf -- messages senderNonce [5] OCTET STRING OPTIONAL, recipNonce [6] OCTET STRING OPTIONAL, -- nonces used to provide replay protection, senderNonce -- is inserted by the creator of this message; recipNonce -- is a nonce previously inserted in a related message by -- the intended recipient of this message freeText [7] PKIFreeText OPTIONAL, -- this may be used to indicate context-specific instructions -- (this field is intended for human consumption) generalInfo [8] SEQUENCE SIZE (1..MAX) OF InfoTypeAndValue OPTIONAL -- this may be used to convey context-specific information -- (this field not primarily intended for human consumption) }

Field Summary

Modifier and TypeField and Description
public static final int
public static final int
public static final int
private PKIFreeText
private ASN1Sequence
private ASN1GeneralizedTime
public static final GeneralName
NULL_NAME

Value for a "null" recipient or sender.

private AlgorithmIdentifier
private final ASN1Integer
private final GeneralName
private ASN1OctetString
private ASN1OctetString
private final GeneralName
private ASN1OctetString
private ASN1OctetString
private ASN1OctetString

Constructor Summary

AccessConstructor and Description
private
public
PKIHeader(int pvno, GeneralName sender, GeneralName recipient)

private
PKIHeader(ASN1Integer pvno, GeneralName sender, GeneralName recipient)

Method Summary

Modifier and TypeMethod and Description
private void
public PKIFreeText
public InfoTypeAndValue[]
public static PKIHeader
public ASN1GeneralizedTime
public AlgorithmIdentifier
public ASN1Integer
public GeneralName
public ASN1OctetString
public ASN1OctetString
public GeneralName
public ASN1OctetString
public ASN1OctetString
public ASN1OctetString
public ASN1Primitive

Returns:

a basic ASN.1 object representation.
toASN1Primitive
()

Implements abstract org.bouncycastle.asn1.ASN1Object.toASN1Primitive.

Implements org.bouncycastle.asn1.ASN1Encodable.toASN1Primitive.

 PKIHeader ::= SEQUENCE {
           pvno                INTEGER     { cmp1999(1), cmp2000(2) },
           sender              GeneralName,
           -- identifies the sender
           recipient           GeneralName,
           -- identifies the intended recipient
           messageTime     [0] GeneralizedTime         OPTIONAL,
           -- time of production of this message (used when sender
           -- believes that the transport will be "suitable"; i.e.,
           -- that the time will still be meaningful upon receipt)
           protectionAlg   [1] AlgorithmIdentifier     OPTIONAL,
           -- algorithm used for calculation of protection bits
           senderKID       [2] KeyIdentifier           OPTIONAL,
           recipKID        [3] KeyIdentifier           OPTIONAL,
           -- to identify specific keys used for protection
           transactionID   [4] OCTET STRING            OPTIONAL,
           -- identifies the transaction; i.e., this will be the same in
           -- corresponding request, response, certConf, and PKIConf
           -- messages
           senderNonce     [5] OCTET STRING            OPTIONAL,
           recipNonce      [6] OCTET STRING            OPTIONAL,
           -- nonces used to provide replay protection, senderNonce
           -- is inserted by the creator of this message; recipNonce
           -- is a nonce previously inserted in a related message by
           -- the intended recipient of this message
           freeText        [7] PKIFreeText             OPTIONAL,
           -- this may be used to indicate context-specific instructions
           -- (this field is intended for human consumption)
           generalInfo     [8] SEQUENCE SIZE (1..MAX) OF
                                InfoTypeAndValue     OPTIONAL
           -- this may be used to convey context-specific information
           -- (this field not primarily intended for human consumption)
}
Inherited from org.bouncycastle.asn1.ASN1Object:
encodeToencodeToequalsgetEncodedgetEncodedhasEncodedTagValuehashCode

Field Detail

CMP_1999back to summary
public static final int CMP_1999
CMP_2000back to summary
public static final int CMP_2000
CMP_2021back to summary
public static final int CMP_2021
freeTextback to summary
private PKIFreeText freeText
generalInfoback to summary
private ASN1Sequence generalInfo
messageTimeback to summary
private ASN1GeneralizedTime messageTime
NULL_NAMEback to summary
public static final GeneralName NULL_NAME

Value for a "null" recipient or sender.

protectionAlgback to summary
private AlgorithmIdentifier protectionAlg
pvnoback to summary
private final ASN1Integer pvno
recipientback to summary
private final GeneralName recipient
recipKIDback to summary
private ASN1OctetString recipKID
recipNonceback to summary
private ASN1OctetString recipNonce
senderback to summary
private final GeneralName sender
senderKIDback to summary
private ASN1OctetString senderKID
senderNonceback to summary
private ASN1OctetString senderNonce
transactionIDback to summary
private ASN1OctetString transactionID

Constructor Detail

PKIHeaderback to summary
private PKIHeader(ASN1Sequence seq)
PKIHeaderback to summary
public PKIHeader(int pvno, GeneralName sender, GeneralName recipient)
PKIHeaderback to summary
private PKIHeader(ASN1Integer pvno, GeneralName sender, GeneralName recipient)

Method Detail

addOptionalback to summary
private void addOptional(ASN1EncodableVector v, int tagNo, ASN1Encodable obj)
getFreeTextback to summary
public PKIFreeText getFreeText()
getGeneralInfoback to summary
public InfoTypeAndValue[] getGeneralInfo()
getInstanceback to summary
public static PKIHeader getInstance(Object o)
getMessageTimeback to summary
public ASN1GeneralizedTime getMessageTime()
getProtectionAlgback to summary
public AlgorithmIdentifier getProtectionAlg()
getPvnoback to summary
public ASN1Integer getPvno()
getRecipientback to summary
public GeneralName getRecipient()
getRecipKIDback to summary
public ASN1OctetString getRecipKID()
getRecipNonceback to summary
public ASN1OctetString getRecipNonce()
getSenderback to summary
public GeneralName getSender()
getSenderKIDback to summary
public ASN1OctetString getSenderKID()
getSenderNonceback to summary
public ASN1OctetString getSenderNonce()
getTransactionIDback to summary
public ASN1OctetString getTransactionID()
toASN1Primitiveback to summary
public ASN1Primitive toASN1Primitive()

Implements abstract org.bouncycastle.asn1.ASN1Object.toASN1Primitive.

Implements org.bouncycastle.asn1.ASN1Encodable.toASN1Primitive.

 PKIHeader ::= SEQUENCE {
           pvno                INTEGER     { cmp1999(1), cmp2000(2) },
           sender              GeneralName,
           -- identifies the sender
           recipient           GeneralName,
           -- identifies the intended recipient
           messageTime     [0] GeneralizedTime         OPTIONAL,
           -- time of production of this message (used when sender
           -- believes that the transport will be "suitable"; i.e.,
           -- that the time will still be meaningful upon receipt)
           protectionAlg   [1] AlgorithmIdentifier     OPTIONAL,
           -- algorithm used for calculation of protection bits
           senderKID       [2] KeyIdentifier           OPTIONAL,
           recipKID        [3] KeyIdentifier           OPTIONAL,
           -- to identify specific keys used for protection
           transactionID   [4] OCTET STRING            OPTIONAL,
           -- identifies the transaction; i.e., this will be the same in
           -- corresponding request, response, certConf, and PKIConf
           -- messages
           senderNonce     [5] OCTET STRING            OPTIONAL,
           recipNonce      [6] OCTET STRING            OPTIONAL,
           -- nonces used to provide replay protection, senderNonce
           -- is inserted by the creator of this message; recipNonce
           -- is a nonce previously inserted in a related message by
           -- the intended recipient of this message
           freeText        [7] PKIFreeText             OPTIONAL,
           -- this may be used to indicate context-specific instructions
           -- (this field is intended for human consumption)
           generalInfo     [8] SEQUENCE SIZE (1..MAX) OF
                                InfoTypeAndValue     OPTIONAL
           -- this may be used to convey context-specific information
           -- (this field not primarily intended for human consumption)
}
Returns:ASN1Primitive

a basic ASN.1 object representation.