2 * Copyright (c) 2012 Samsung Electronics Co., Ltd All Rights Reserved
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 * @file wrt_oscp_api.h
18 * @author Zofia Abramowska (z.abramowska@samsung.com)
20 * @brief This is C api for WRT OCSP
22 #ifndef WRT_OCSP_API_H
23 #define WRT_OCSP_API_H
31 WRT_OCSP_INVALID_ARGUMENTS,
32 WRT_OCSP_INTERNAL_ERROR
35 typedef int wrt_ocsp_widget_handle_t;
37 //The certificate has not been revoked.
38 WRT_OCSP_WIDGET_VERIFICATION_STATUS_GOOD,
40 //The certificate has been revoked.
41 WRT_OCSP_WIDGET_VERIFICATION_STATUS_REVOKED
44 }wrt_ocsp_widget_verification_status_t;
46 //-------------Initialization and shutdown-------------------
48 * Establishes connection to security server. Must be called only once.
49 * Returns WRT_OCSP_OK or error
51 wrt_ocsp_return_t wrt_ocsp_initialize(void);
54 * Deinitializes internal structures. Must be called only once.
55 * Returns WRT_OCSP_OK or error
58 wrt_ocsp_return_t wrt_ocsp_shutdown(void);
60 //-------------Widget verification------------------------------
62 * Requests verification for widget identified with 'handle'.
63 * 'status holds server response.
64 * Returns WRT_OCSP_OK or error
67 wrt_ocsp_return_t wrt_ocsp_verify_widget(wrt_ocsp_widget_handle_t handle,
68 wrt_ocsp_widget_verification_status_t* status);
74 #endif //WRT_OCSP_API_H