change the command tool path to the absolute path
[platform/framework/native/appfw.git] / inc / FSecPkcsTypes.h
1 //
2 // Copyright (c) 2013 Samsung Electronics Co., Ltd.
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 /**
18  * @file                FSecPkcsTypes.h
19  * @brief               This is the header file for the declarations of the %PkcsAlgorithmParameterType and %Pkcs08TagValue enumerators and the AttributeType OID List.
20  *
21  * This header file contains the declarations of the PkcsAlgorithmParameterType and Pkcs08TagValue enumerators and the AttributeType OID List.
22  */
23
24 #ifndef _FSEC_PKCS_TYPES_H_
25 #define _FSEC_PKCS_TYPES_H_
26
27 #include <FBaseString.h>
28
29 namespace Tizen { namespace Security { namespace Pkcs
30 {
31
32 /**
33  * @enum                PkcsAlgorithmParameterType
34  *
35  * Defines the types of parameters.
36  *
37  * @since               2.1
38  */
39 enum PkcsAlgorithmParameterType
40 {
41         PKCS_ALGO_PARAM_TYPE_IV,                                        /**< The parameter type is initial vector */
42         PKCS_ALGO_PARAM_TYPE_PKCS05_PBES02,                     /**< The parameter type is pkcs5 password based encryption scheme2 */
43         PKCS_ALGO_PARAM_TYPE_PKCS05_KDF02,                      /**< The parameter type is pkcs5 password based key derivation scheme2 */
44         PKCS_ALGO_PARAM_TYPE_PKCS05_MAC,                        /**< The parameter type is pkcs5 message authentication scheme */
45         PKCS_ALGO_PARAM_TYPE_RC2,                                       /**< The parameter type is rc2 cbc */
46         PKCS_ALGO_PARAM_TYPE_UNKOWN = 0xFFFFFFFF        /**< An unknown parameter type */
47 }; //PkcsAlgorithmParameterType;
48
49 /**
50  * @enum                Pkcs08TagValue
51  *
52  * Defines the Asn1 tag type.
53  *
54  * @since               2.1
55  */
56 enum Pkcs08TagValue
57 {
58         PKCS08_TAG_RESERVED = 0,                        /**< Reserved for use by the encoding rules */
59         PKCS08_TAG_BOOLEAN = 1,                         /**< An arbitrary bool value */
60         PKCS08_TAG_INTEGER = 2,                         /**< An arbitrary integer value */
61         PKCS08_TAG_BITSTRING = 3,                       /**< An arbitrary string of bits */
62         PKCS08_TAG_OCTETSTRING = 4,                     /**< An arbitrary string of octets */
63         PKCS08_TAG_NULL = 5,                            /**< A null value */
64         PKCS08_TAG_OBJECT_ID = 6,                       /**< An object identifier */
65         PKCS08_TAG_OBJECT_DES = 7,                      /**< An object descriptor providing a brief description of an object */
66         PKCS08_TAG_EXTERNAL = 8,                        /**< An arbitrary external value */
67         PKCS08_TAG_REAL = 9,                            /**< An arbitrary real value */
68         PKCS08_TAG_ENUM = 10,                           /**< An enumerated value */
69         PKCS08_TAG_EMBEDDED = 11,                       /**< An embedded value */
70         PKCS08_TAG_UTF8STRING = 12,                     /**< An arbitrary utf8 string */
71         PKCS08_TAG_REL_OBJ_ID = 13,                     /**< A relative object ID */
72         PKCS08_TAG_SEQUENCE = 16,                       /**< An ordered collection of one or more types */
73         PKCS08_TAG_SET = 17,                            /**< An unordered collection of one or more types */
74         PKCS08_TAG_CHAR_STRING = 18,            /**< A numeric string */
75         PKCS08_TAG_PRINTABLE_STRING = 19,       /**< An arbitrary string of printable characters */
76         PKCS08_TAG_TELETEXT_STRING = 20,        /**< A teletext string, T61 string */
77         PKCS08_TAG_VIDEOTEXT_STRING = 21,       /**< A videotext string */
78         PKCS08_TAG_IA5STRING = 22,                      /**< An arbitrary string of IA5 (ASCII) characters */
79         PKCS08_TAG_UTC_TIME = 23,                       /**< A coordinated universal time or Greenwich Mean Time (GMT) value */
80         PKCS08_TAG_GEN_TIME = 24,                       /**< A generalized time */
81         PKCS08_TAG_GRAPHICS_STRING = 25,        /**< A graphic string */
82         PKCS08_TAG_VISIBLE_STRING = 26,         /**< A visible string, ISO64 string */
83         PKCS08_TAG_GENERAL_STRING = 27,         /**< A general string */
84         PKCS08_TAG_UNIVERSAL_STRING = 28,       /**< A universal string */
85         PKCS08_TAG_CHARACTER_STRING = 29,       /**< An arbitrary character string */
86         PKCS08_TAG_BMP_STRING = 30,                     /**< A bmp string */
87         PKCS08_TAG_UNKNOWN = -1                         /**< An unknown tag type */
88 }; // Pkcs08TagValue;
89
90 /*
91 -- Basic object identifiers in Pkcs05 and Pkcs08
92 */
93
94 _OSP_EXPORT_ extern const wchar_t OID_PBKDF2[];                 /**< An object identifier for password based key derivation function scheme2 */
95 _OSP_EXPORT_ extern const wchar_t OID_PBES2[];                  /**< An object identifier for password based encryption scheme2 */
96 _OSP_EXPORT_ extern const wchar_t OID_PBMAC1[];                 /**< An object identifier for password based message authentication scheme1 */
97 _OSP_EXPORT_ extern const wchar_t OID_HMAC_SHA1[];              /**< An object identifier for hmac-sha1 */
98 _OSP_EXPORT_ extern const wchar_t OID_HMAC_SHA2_224[];  /**< An object identifier for hmac-sha224 */
99 _OSP_EXPORT_ extern const wchar_t OID_HMAC_SHA2_256[];  /**< An object identifier for hmac-sha256 */
100 _OSP_EXPORT_ extern const wchar_t OID_HMAC_SHA2_384[];  /**< An object identifier for hmac-sha384 */
101 _OSP_EXPORT_ extern const wchar_t OID_HMAC_SHA2_512[];  /**< An object identifier for hmac-sha512 */
102 _OSP_EXPORT_ extern const wchar_t OID_DES_CBC[];                /**< An object identifier for des-cbc mode */
103 _OSP_EXPORT_ extern const wchar_t OID_DES_CBC_EDE3[];   /**< An object identifier for des-cbc-ede3 mode */
104 _OSP_EXPORT_ extern const wchar_t OID_AES_128_CBC[];    /**< An object identifier for aes-128-cbc mode */
105 _OSP_EXPORT_ extern const wchar_t OID_AES_192_CBC[];    /**< An object identifier for aes-192-cbc mode */
106 _OSP_EXPORT_ extern const wchar_t OID_AES_256_CBC[];    /**< An object identifier for aes-256-cbc mode */
107 _OSP_EXPORT_ extern const wchar_t OID_RC2_CBC[];                /**< An object identifier for rc2-cbc mode */
108 _OSP_EXPORT_ extern const wchar_t OID_RSA_ENCRYPTION[]; /**< An object identifier for RSA encryption scheme */
109
110
111 /*
112 -- Basic object identifiers in Pkcs08 for AttributeType
113 */
114
115 _OSP_EXPORT_ extern const wchar_t OID_ATTR_NAME[];                                      /**< An object identifier for attribute type name */
116 _OSP_EXPORT_ extern const wchar_t OID_ATTR_SURNAME[];                           /**< An object identifier for attribute type surname */
117 _OSP_EXPORT_ extern const wchar_t OID_ATTR_GIVEN_NAME[];                        /**< An object identifier for attribute type of any given name */
118 _OSP_EXPORT_ extern const wchar_t OID_ATTR_INITIAL[];                           /**< An object identifier for attribute type initial */
119 _OSP_EXPORT_ extern const wchar_t OID_ATTR_GEN_QUALIFIER[];                     /**< An object identifier for attribute type generation qualifier */
120 _OSP_EXPORT_ extern const wchar_t OID_ATTR_COMMON_NAME[];                       /**< An object identifier for attribute type common name */
121 _OSP_EXPORT_ extern const wchar_t OID_ATTR_LOCALITY_NAME[];                     /**< An object identifier for attribute type locality name */
122 _OSP_EXPORT_ extern const wchar_t OID_ATTR_STATE_OR_PROV_NAME[];        /**< An object identifier for attribute type state/province name */
123 _OSP_EXPORT_ extern const wchar_t OID_ATTR_ORG_NAME[];                          /**< An object identifier for attribute type of any organization name */
124 _OSP_EXPORT_ extern const wchar_t OID_ATTR_ORG_UNIT_NAME[];                     /**< An object identifier for any organization unit name */
125 _OSP_EXPORT_ extern const wchar_t OID_ATTR_TITLE[];                                     /**< An object identifier for attribute type title */
126 _OSP_EXPORT_ extern const wchar_t OID_ATTR_DN_QUALIFIER[];                      /**< An object identifier for distinguished name qualifier */
127 _OSP_EXPORT_ extern const wchar_t OID_ATTR_COUNTRY_NAME[];                      /**< An object identifier for attribute type country name */
128 _OSP_EXPORT_ extern const wchar_t OID_ATTR_SERIAL_NUMBER[];                     /**< An object identifier for attribute type serial number */
129 _OSP_EXPORT_ extern const wchar_t OID_ATTR_PSEUDONYM[];                         /**< An object identifier for attribute type pseudonym */
130 _OSP_EXPORT_ extern const wchar_t OID_ATTR_DOMAIN_COMPONENT[];          /**< An object identifier for any domain component */
131 _OSP_EXPORT_ extern const wchar_t OID_ATTR_EMAIL_ADDRESS[];                     /**< An object identifier for any email address */
132
133 } } } // Tizen::Security::Pkcs
134
135
136
137
138 #endif // _FSEC_PKCS_TYPES_H_