1 /*
2  * Copyright (C) 2017 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 /*
17  * Copyright (c) 2015-2017, The Linux Foundation.
18  */
19 
20 /*
21  * Copyright (C) 2011 Deutsche Telekom, A.G.
22  *
23  * Licensed under the Apache License, Version 2.0 (the "License");
24  * you may not use this file except in compliance with the License.
25  * You may obtain a copy of the License at
26  *
27  *      http://www.apache.org/licenses/LICENSE-2.0
28  *
29  * Unless required by applicable law or agreed to in writing, software
30  * distributed under the License is distributed on an "AS IS" BASIS,
31  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
32  * See the License for the specific language governing permissions and
33  * limitations under the License.
34  */
35 
36 package com.android.se.security.arf;
37 
38 /** Defines all tags for parsing PKCS#15 files */
39 public abstract class ASN1 {
40     // ASN.1 tags
41     public static final byte TAG_Sequence = 0x30;
42     public static final byte TAG_Integer = 0x02;
43     public static final byte TAG_OctetString = 0x04;
44     public static final byte TAG_OID = 0x06;
45     public static final byte TAG_ContextSpecPrim0 = (byte) 0x80;
46     public static final byte TAG_ContextSpecPrim1 = (byte) 0x81;
47     public static final byte TAG_ContextSpecPrim2 = (byte) 0x82;
48     public static final byte TAG_ContextSpecPrim3 = (byte) 0x83;
49     public static final byte TAG_ContextSpecPrim4 = (byte) 0x84;
50     public static final byte TAG_ContextSpecPrim5 = (byte) 0x85;
51     public static final byte TAG_ContextSpecPrim6 = (byte) 0x86;
52     public static final byte TAG_ContextSpecPrim7 = (byte) 0x87;
53     public static final byte TAG_ContextSpecPrim8 = (byte) 0x88;
54     public static final byte TAG_PrivateKey = (byte) 0xA0;
55     public static final byte TAG_PublicKey = (byte) 0xA1;
56     public static final byte TAG_PublicKeyTrusted = (byte) 0xA2;
57     public static final byte TAG_SecretKey = (byte) 0xA3;
58     public static final byte TAG_Certificate = (byte) 0xA4;
59     public static final byte TAG_CertificateTrusted = (byte) 0xA5;
60     public static final byte TAG_CertificateUseful = (byte) 0xA6;
61     public static final byte TAG_DataObject = (byte) 0xA7;
62     public static final byte TAG_AuthenticateObject = (byte) 0xA8;
63 
64     // EF_DIR tags
65     public static final byte TAG_ApplTemplate = 0x61;
66     public static final byte TAG_ApplIdentifier = 0x4F;
67     public static final byte TAG_ApplLabel = 0x50;
68     public static final byte TAG_ApplPath = 0x51;
69     public static final byte TAG_FCP = 0x62;
70 
71     // Others tags
72     public static final byte TAG_Padding = (byte) 0xFF;
73 }
74