1 /* |
|
2 * ============================================================================ |
|
3 * Name : ./accesssec/eapol/eapol_framework/wapi_common/include/wapi_certificate_asn1_der_parser.h |
|
4 * Part of : WAPI / WAPI *** Info from the SWAD |
|
5 * Description : WAPI authentication |
|
6 * Version : %version: 3 % << Don't touch! Updated by Synergy at check-out. |
|
7 * |
|
8 * Copyright © 2001-2009 Nokia. All rights reserved. |
|
9 * This material, including documentation and any related computer |
|
10 * programs, is protected by copyright controlled by Nokia. All |
|
11 * rights are reserved. Copying, including reproducing, storing, |
|
12 * adapting or translating, any or all of this material requires the |
|
13 * prior written consent of Nokia. This material also contains |
|
14 * confidential information which may not be disclosed to others |
|
15 * without the prior written consent of Nokia. |
|
16 * ============================================================================ |
|
17 * Template version: 4.2 |
|
18 */ |
|
19 |
|
20 |
|
21 |
|
22 #if !defined(_WAPI_CERTIFICATE_ASN1_DER_PARSER_H_) |
|
23 #define _WAPI_CERTIFICATE_ASN1_DER_PARSER_H_ |
|
24 |
|
25 #include "eap_variable_data.h" |
|
26 #include "eap_am_export.h" |
|
27 #include "eap_array.h" |
|
28 #include "asn1_der_type.h" |
|
29 |
|
30 //-------------------------------------------------- |
|
31 |
|
32 class EAP_EXPORT wapi_certificate_asn1_der_parser_c |
|
33 { |
|
34 //-------------------------------------------------- |
|
35 public: |
|
36 //-------------------------------------------------- |
|
37 |
|
38 EAP_FUNC_IMPORT virtual ~wapi_certificate_asn1_der_parser_c(); |
|
39 |
|
40 EAP_FUNC_IMPORT wapi_certificate_asn1_der_parser_c( |
|
41 abs_eap_am_tools_c * const tools); |
|
42 |
|
43 /** |
|
44 * The get_is_valid() function returns the status of the wapi_certificate_asn1_der_parser_c object. |
|
45 * @return True indicates the object is initialized. |
|
46 */ |
|
47 EAP_FUNC_IMPORT bool get_is_valid() const; |
|
48 |
|
49 /** |
|
50 * The decode() function decodes ASN.1/DER encoded certificate. |
|
51 * Data can include only one ASN.1/DER encoded certificate. |
|
52 * @return eap_status_ok indicates successfull operation. |
|
53 */ |
|
54 EAP_FUNC_IMPORT eap_status_e decode(const eap_variable_data_c * const asn1_der_certificate); |
|
55 |
|
56 |
|
57 EAP_FUNC_IMPORT eap_status_e read_certificate_id( |
|
58 eap_variable_data_c * const asn1_der_subject_name, |
|
59 eap_variable_data_c * const asn1_der_issuer_name, |
|
60 eap_variable_data_c * const asn1_der_sequence_number); |
|
61 |
|
62 EAP_FUNC_IMPORT eap_status_e read_certificate_id( |
|
63 eap_variable_data_c * const identity); |
|
64 |
|
65 //-------------------------------------------------- |
|
66 private: |
|
67 //-------------------------------------------------- |
|
68 |
|
69 abs_eap_am_tools_c * const m_am_tools; |
|
70 |
|
71 bool m_is_valid; |
|
72 |
|
73 asn1_der_type_c m_parser; |
|
74 |
|
75 //-------------------------------------------------- |
|
76 }; |
|
77 |
|
78 //-------------------------------------------------------------------------------------------------- |
|
79 |
|
80 #endif //#if !defined(_WAPI_CERTIFICATE_ASN1_DER_PARSER_H_) |
|
81 |
|
82 //-------------------------------------------------------------------------------------------------- |
|
83 |
|
84 // End. |
|