]> git.sesse.net Git - casparcg/blob - dependencies64/cef/include/capi/cef_ssl_info_capi.h
* Merged html producer and updated to latest CEF version (does not have satisfactory...
[casparcg] / dependencies64 / cef / include / capi / cef_ssl_info_capi.h
1 // Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
2 //
3 // Redistribution and use in source and binary forms, with or without
4 // modification, are permitted provided that the following conditions are
5 // met:
6 //
7 //    * Redistributions of source code must retain the above copyright
8 // notice, this list of conditions and the following disclaimer.
9 //    * Redistributions in binary form must reproduce the above
10 // copyright notice, this list of conditions and the following disclaimer
11 // in the documentation and/or other materials provided with the
12 // distribution.
13 //    * Neither the name of Google Inc. nor the name Chromium Embedded
14 // Framework nor the names of its contributors may be used to endorse
15 // or promote products derived from this software without specific prior
16 // written permission.
17 //
18 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 //
30 // ---------------------------------------------------------------------------
31 //
32 // This file was generated by the CEF translator tool and should not edited
33 // by hand. See the translator.README.txt file in the tools directory for
34 // more information.
35 //
36
37 #ifndef CEF_INCLUDE_CAPI_CEF_SSL_INFO_CAPI_H_
38 #define CEF_INCLUDE_CAPI_CEF_SSL_INFO_CAPI_H_
39 #pragma once
40
41 #include "include/capi/cef_base_capi.h"
42 #include "include/capi/cef_values_capi.h"
43
44 #ifdef __cplusplus
45 extern "C" {
46 #endif
47
48
49 ///
50 // Structure representing the issuer or subject field of an X.509 certificate.
51 ///
52 typedef struct _cef_sslcert_principal_t {
53   ///
54   // Base structure.
55   ///
56   cef_base_t base;
57
58   ///
59   // Returns a name that can be used to represent the issuer.  It tries in this
60   // order: CN, O and OU and returns the first non-NULL one found.
61   ///
62   // The resulting string must be freed by calling cef_string_userfree_free().
63   cef_string_userfree_t (CEF_CALLBACK *get_display_name)(
64       struct _cef_sslcert_principal_t* self);
65
66   ///
67   // Returns the common name.
68   ///
69   // The resulting string must be freed by calling cef_string_userfree_free().
70   cef_string_userfree_t (CEF_CALLBACK *get_common_name)(
71       struct _cef_sslcert_principal_t* self);
72
73   ///
74   // Returns the locality name.
75   ///
76   // The resulting string must be freed by calling cef_string_userfree_free().
77   cef_string_userfree_t (CEF_CALLBACK *get_locality_name)(
78       struct _cef_sslcert_principal_t* self);
79
80   ///
81   // Returns the state or province name.
82   ///
83   // The resulting string must be freed by calling cef_string_userfree_free().
84   cef_string_userfree_t (CEF_CALLBACK *get_state_or_province_name)(
85       struct _cef_sslcert_principal_t* self);
86
87   ///
88   // Returns the country name.
89   ///
90   // The resulting string must be freed by calling cef_string_userfree_free().
91   cef_string_userfree_t (CEF_CALLBACK *get_country_name)(
92       struct _cef_sslcert_principal_t* self);
93
94   ///
95   // Retrieve the list of street addresses.
96   ///
97   void (CEF_CALLBACK *get_street_addresses)(
98       struct _cef_sslcert_principal_t* self, cef_string_list_t addresses);
99
100   ///
101   // Retrieve the list of organization names.
102   ///
103   void (CEF_CALLBACK *get_organization_names)(
104       struct _cef_sslcert_principal_t* self, cef_string_list_t names);
105
106   ///
107   // Retrieve the list of organization unit names.
108   ///
109   void (CEF_CALLBACK *get_organization_unit_names)(
110       struct _cef_sslcert_principal_t* self, cef_string_list_t names);
111
112   ///
113   // Retrieve the list of domain components.
114   ///
115   void (CEF_CALLBACK *get_domain_components)(
116       struct _cef_sslcert_principal_t* self, cef_string_list_t components);
117 } cef_sslcert_principal_t;
118
119
120 ///
121 // Structure representing SSL information.
122 ///
123 typedef struct _cef_sslinfo_t {
124   ///
125   // Base structure.
126   ///
127   cef_base_t base;
128
129   ///
130   // Returns the subject of the X.509 certificate. For HTTPS server certificates
131   // this represents the web server.  The common name of the subject should
132   // match the host name of the web server.
133   ///
134   struct _cef_sslcert_principal_t* (CEF_CALLBACK *get_subject)(
135       struct _cef_sslinfo_t* self);
136
137   ///
138   // Returns the issuer of the X.509 certificate.
139   ///
140   struct _cef_sslcert_principal_t* (CEF_CALLBACK *get_issuer)(
141       struct _cef_sslinfo_t* self);
142
143   ///
144   // Returns the DER encoded serial number for the X.509 certificate. The value
145   // possibly includes a leading 00 byte.
146   ///
147   struct _cef_binary_value_t* (CEF_CALLBACK *get_serial_number)(
148       struct _cef_sslinfo_t* self);
149
150   ///
151   // Returns the date before which the X.509 certificate is invalid.
152   // CefTime.GetTimeT() will return 0 if no date was specified.
153   ///
154   cef_time_t (CEF_CALLBACK *get_valid_start)(struct _cef_sslinfo_t* self);
155
156   ///
157   // Returns the date after which the X.509 certificate is invalid.
158   // CefTime.GetTimeT() will return 0 if no date was specified.
159   ///
160   cef_time_t (CEF_CALLBACK *get_valid_expiry)(struct _cef_sslinfo_t* self);
161
162   ///
163   // Returns the DER encoded data for the X.509 certificate.
164   ///
165   struct _cef_binary_value_t* (CEF_CALLBACK *get_derencoded)(
166       struct _cef_sslinfo_t* self);
167
168   ///
169   // Returns the PEM encoded data for the X.509 certificate.
170   ///
171   struct _cef_binary_value_t* (CEF_CALLBACK *get_pemencoded)(
172       struct _cef_sslinfo_t* self);
173 } cef_sslinfo_t;
174
175
176 #ifdef __cplusplus
177 }
178 #endif
179
180 #endif  // CEF_INCLUDE_CAPI_CEF_SSL_INFO_CAPI_H_