org.mozilla.jss.pkix.cmc

Class OtherInfo

Implemented Interfaces:
ASN1Value

public class OtherInfo
extends java.lang.Object
implements ASN1Value

CMCStatusInfo OtherInfo:
   OtherInfo ::= CHOICE { 
       failInfo INTEGER, 
       pendInfo PendInfo 
   } 
 

Nested Class Summary

static class
OtherInfo.Template
A Template for decoding a OtherInfo.
static class
OtherInfo.Type
The type of OtherInfo.

Field Summary

static int
BAD_ALG
static int
BAD_CERT_ID
static int
BAD_IDENTITY
static int
BAD_MESSAGE_CHECK
static int
BAD_REQUEST
static int
BAD_TIME
static OtherInfo.Type
FAIL
static String[]
FAIL_INFO
static int
INTERNAL_CA_ERROR
static int
MUST_ARCHIVE_KEYS
static int
NO_KEY_REUSE
static OtherInfo.Type
PEND
static int
POP_FAILED
static int
POP_REQUIRED
static int
TRY_LATER
static int
UNSUPORTED_EXT

Constructor Summary

OtherInfo()
OtherInfo(OtherInfo.Type type, INTEGER failInfo, PendInfo pendInfo)
Constructs a OtherInfo from its components.

Method Summary

void
encode(OutputStream ostream)
Write this value's DER encoding to an output stream using its own base tag.
void
encode(Tag implicitTag, OutputStream ostream)
Write this value's DER encoding to an output stream using an implicit tag.
INTEGER
getFailInfo()
If type == FAIL, returns the failInfo field.
PendInfo
getPendInfo()
If type == PEND, returns the pendInfo field.
Tag
getTag()
Returns the base tag for this type, not counting any tags that may be imposed on it by its context.
static OtherInfo.Template
getTemplate()
OtherInfo.Type
getType()
Returns the type of OtherInfo:
  • FAIL
  • PEND

Field Details

BAD_ALG

public static final int BAD_ALG
Field Value:
0

BAD_CERT_ID

public static final int BAD_CERT_ID
Field Value:
4

BAD_IDENTITY

public static final int BAD_IDENTITY
Field Value:
7

BAD_MESSAGE_CHECK

public static final int BAD_MESSAGE_CHECK
Field Value:
1

BAD_REQUEST

public static final int BAD_REQUEST
Field Value:
2

BAD_TIME

public static final int BAD_TIME
Field Value:
3

FAIL

public static OtherInfo.Type FAIL

FAIL_INFO

public static final String[] FAIL_INFO

INTERNAL_CA_ERROR

public static final int INTERNAL_CA_ERROR
Field Value:
11

MUST_ARCHIVE_KEYS

public static final int MUST_ARCHIVE_KEYS
Field Value:
6

NO_KEY_REUSE

public static final int NO_KEY_REUSE
Field Value:
10

PEND

public static OtherInfo.Type PEND

POP_FAILED

public static final int POP_FAILED
Field Value:
9

POP_REQUIRED

public static final int POP_REQUIRED
Field Value:
8

TRY_LATER

public static final int TRY_LATER
Field Value:
12

UNSUPORTED_EXT

public static final int UNSUPORTED_EXT
Field Value:
5

Constructor Details

OtherInfo

public OtherInfo()

OtherInfo

public OtherInfo(OtherInfo.Type type,
                 INTEGER failInfo,
                 PendInfo pendInfo)
Constructs a OtherInfo from its components.
Parameters:
type - The type of the otherInfo.
failInfo - the CMCFailInfo code.
pendInfo - the pending information.

Method Details

encode

public void encode(OutputStream ostream)
            throws IOException
Write this value's DER encoding to an output stream using its own base tag.
Specified by:
encode in interface ASN1Value

encode

public void encode(Tag implicitTag,
                   OutputStream ostream)
            throws IOException
Write this value's DER encoding to an output stream using an implicit tag.
Specified by:
encode in interface ASN1Value

getFailInfo

public INTEGER getFailInfo()
If type == FAIL, returns the failInfo field. Otherwise, returns null.

getPendInfo

public PendInfo getPendInfo()
If type == PEND, returns the pendInfo field. Otherwise, returns null.

getTag

public Tag getTag()
Returns the base tag for this type, not counting any tags that may be imposed on it by its context.
Specified by:
getTag in interface ASN1Value

getTemplate

public static OtherInfo.Template getTemplate()

getType

public OtherInfo.Type getType()
Returns the type of OtherInfo:
  • FAIL
  • PEND