// [UNIVERSAL 5] Boolean
new Object[] {
Boolean.FALSE,
new byte[] { 0x25, 0x03, 0x01, 0x01, 0x00 },
new ASN1Explicit(ASN1Constants.CLASS_UNIVERSAL, 5,
ASN1Boolean.getInstance()) },
// [APPLICATION 5] Boolean
new Object[] {
Boolean.FALSE,
new byte[] { 0x65, 0x03, 0x01, 0x01, 0x00 },
new ASN1Explicit(ASN1Constants.CLASS_APPLICATION, 5,
ASN1Boolean.getInstance()) },
// [CONTEXT-SPECIFIC 5] Boolean
new Object[] {
Boolean.FALSE,
new byte[] { (byte) 0xA5, 0x03, 0x01, 0x01, 0x00 },
new ASN1Explicit(ASN1Constants.CLASS_CONTEXTSPECIFIC,
5, ASN1Boolean.getInstance()) },
// [5] Boolean (default = CONTEXT-SPECIFIC)
new Object[] { Boolean.FALSE,
new byte[] { (byte) 0xA5, 0x03, 0x01, 0x01, 0x00 },
new ASN1Explicit(5, ASN1Boolean.getInstance()) },
// [PRIVATE 5] Boolean
new Object[] {
Boolean.FALSE,
new byte[] { (byte) 0xE5, 0x03, 0x01, 0x01, 0x00 },
new ASN1Explicit(ASN1Constants.CLASS_PRIVATE, 5,
ASN1Boolean.getInstance()) },
//
// Boolean = true
//
// [UNIVERSAL 5] Boolean
new Object[] {
Boolean.TRUE,
new byte[] { 0x25, 0x03, 0x01, 0x01, (byte) 0xFF },
new ASN1Explicit(ASN1Constants.CLASS_UNIVERSAL, 5,
ASN1Boolean.getInstance()) },
// [APPLICATION 5] Boolean
new Object[] {
Boolean.TRUE,
new byte[] { 0x65, 0x03, 0x01, 0x01, (byte) 0xFF },
new ASN1Explicit(ASN1Constants.CLASS_APPLICATION, 5,
ASN1Boolean.getInstance()) },
// [CONTEXT-SPECIFIC 5] Boolean
new Object[] {
Boolean.TRUE,
new byte[] { (byte) 0xA5, 0x03, 0x01, 0x01, (byte) 0xFF },
new ASN1Explicit(ASN1Constants.CLASS_CONTEXTSPECIFIC,
5, ASN1Boolean.getInstance()) },
// [5] Boolean (default = CONTEXT-SPECIFIC)
new Object[] {
Boolean.TRUE,
new byte[] { (byte) 0xA5, 0x03, 0x01, 0x01, (byte) 0xFF },
new ASN1Explicit(ASN1Constants.CLASS_CONTEXTSPECIFIC,
5, ASN1Boolean.getInstance()) },
// [PRIVATE 5] Boolean
new Object[] {
Boolean.TRUE,
new byte[] { (byte) 0xE5, 0x03, 0x01, 0x01, (byte) 0xFF },
new ASN1Explicit(ASN1Constants.CLASS_PRIVATE, 5,
ASN1Boolean.getInstance()) },
//
// SequenceOf - testing constructed ASN.1 type
//
// [UNIVERSAL 5] SequenceOf
new Object[] {
new ArrayList(),
new byte[] { 0x25, 0x02, 0x30, 0x00 },
new ASN1Explicit(ASN1Constants.CLASS_UNIVERSAL, 5,
sequence) },
// [APPLICATION 5] SequenceOf
new Object[] {
new ArrayList(),
new byte[] { 0x65, 0x02, 0x30, 0x00 },
new ASN1Explicit(ASN1Constants.CLASS_APPLICATION, 5,
sequence) },
// [CONTEXT-SPECIFIC 5] SequenceOf
new Object[] {
new ArrayList(),
new byte[] { (byte) 0xA5, 0x02, 0x30, 0x00 },
new ASN1Explicit(ASN1Constants.CLASS_CONTEXTSPECIFIC,
5, sequence) },
// [5] SequenceOf (default = CONTEXT-SPECIFIC)
new Object[] {
new ArrayList(),
new byte[] { (byte) 0xA5, 0x02, 0x30, 0x00 },
new ASN1Explicit(ASN1Constants.CLASS_CONTEXTSPECIFIC,
5, sequence) },
// [PRIVATE 5] SequenceOf
new Object[] {
new ArrayList(),
new byte[] { (byte) 0xE5, 0x02, 0x30, 0x00 },
new ASN1Explicit(ASN1Constants.CLASS_PRIVATE, 5,
sequence) } };
}