2 <node name="/Authentication_TLS_Certificate" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
3 <tp:copyright>Copyright © 2010 Collabora Limited</tp:copyright>
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 <interface name="org.freedesktop.Telepathy.Authentication.TLSCertificate">
21 <tp:added version="0.19.13">(as stable API)</tp:added>
24 This object represents a TLS certificate.
27 <tp:simple-type name="Certificate_Data" array-name="Certificate_Data_List"
29 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
30 <p>The raw data contained in a TLS certificate.</p>
32 <p>For X.509 certificates (<tp:member-ref>CertificateType</tp:member-ref>
33 = "x509"), this MUST be in DER format, as defined by the
34 <a href="http://www.itu.int/ITU-T/studygroups/com17/languages/X.690-0207.pdf">X.690</a>
37 <p>For PGP certificates (<tp:member-ref>CertificateType</tp:member-ref>
38 = "pgp"), this MUST be a binary OpenPGP key as defined by section 11.1
39 of <a href="http://www.rfc-editor.org/rfc/4880.txt">RFC 4880</a>.</p>
43 <tp:struct name="TLS_Certificate_Rejection" array-name="TLS_Certificate_Rejection_List">
44 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
45 <p>Struct representing one reason why a TLS certificate was rejected.</p>
46 <p>Since there can be multiple things wrong with a TLS certificate,
47 arrays of this type are used to represent lists of reasons for
48 rejection. In that case, the most important reason SHOULD be placed
49 first in the list.</p>
52 <tp:member name="Reason" type="u"
53 tp:type="TLS_Certificate_Reject_Reason">
54 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
55 <p>The value of the TLS_Certificate_Reject_Reason enumeration for
56 this certificate rejection.
58 Clients that do not understand the <code>Error</code> member,
59 which may be implementation-specific, can use this property to
60 classify rejection reasons into common categories.
66 <tp:member name="Error" type="s"
67 tp:type="DBus_Error_Name">
68 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
69 <p>The DBus error name for this certificate rejection.</p>
70 <p>This MAY correspond to the value of the <code>Reason</code> member,
71 or MAY be a more specific D-Bus error name, perhaps implementation-specific.</p>
75 <tp:member name="Details" type="a{sv}"
76 tp:type="String_Variant_Map">
77 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
78 <p>Additional information about why the certificate was rejected.
79 This MAY also include one or more of the following well-known keys:</p>
82 <dt>user-requested (b)</dt>
83 <dd>True if the error was due to an user-requested rejection of
84 the certificate; False if there was an unrecoverable error in the
85 verification process.</dd>
86 <dt>expected-hostname (s)</dt>
87 <dd>If the rejection reason is Hostname_Mismatch, the hostname that
88 the server certificate was expected to have.</dd>
89 <dt>certificate-hostname (s)</dt>
90 <dd>If the rejection reason is Hostname_Mismatch, the hostname of
91 the certificate that was presented.
93 <p>For instance, if you try to connect to gmail.com but are presented
94 with a TLS certificate issued to evil.example.org, the error details
95 for Hostname_Mismatch MAY include:</p>
98 'expected-hostname': 'gmail.com',
99 'certificate-hostname': 'evil.example.org',
104 <dt>debug-message (s)</dt>
105 <dd>Debugging information on the error, corresponding to the
106 message part of a D-Bus error message, which SHOULD NOT be
107 displayed to users under normal circumstances</dd>
114 <tp:enum type="u" name="TLS_Certificate_State">
116 The possible states for a <tp:dbus-ref
117 namespace="org.freedesktop.Telepathy.Authentication">TLSCertificate</tp:dbus-ref>
121 <tp:enumvalue suffix="Pending" value="0">
123 The certificate is currently waiting to be accepted or rejected.
127 <tp:enumvalue suffix="Accepted" value="1">
129 The certificate has been verified.
133 <tp:enumvalue suffix="Rejected" value="2">
135 The certificate has been rejected.
140 <tp:enum type="u" name="TLS_Certificate_Reject_Reason">
142 Possible reasons to reject a TLS certificate.
145 <tp:enumvalue suffix="Unknown" value="0">
147 The certificate has been rejected for another reason
148 not listed in this enumeration.
152 <tp:enumvalue suffix="Untrusted" value="1">
154 The certificate is not trusted.
158 <tp:enumvalue suffix="Expired" value="2">
160 The certificate is expired.
164 <tp:enumvalue suffix="Not_Activated" value="3">
166 The certificate is not active yet.
170 <tp:enumvalue suffix="Fingerprint_Mismatch" value="4">
172 The certificate provided does not have the expected
177 <tp:enumvalue suffix="Hostname_Mismatch" value="5">
179 The hostname certified does not match the provided one.
183 <tp:enumvalue suffix="Self_Signed" value="6">
185 The certificate is self-signed.
189 <tp:enumvalue suffix="Revoked" value="7">
191 The certificate has been revoked.
195 <tp:enumvalue suffix="Insecure" value="8">
197 The certificate uses an insecure cipher algorithm, or is
198 cryptographically weak.
202 <tp:enumvalue suffix="Limit_Exceeded" value="9">
204 The length in bytes of the certificate, or the depth of the
205 certificate chain exceed the limits imposed by the crypto
211 <property name="State" type="u" access="read"
212 tp:type="TLS_Certificate_State"
213 tp:name-for-bindings="State">
215 The current state of this certificate.
216 State change notifications happen by means of the
217 <tp:member-ref>Accepted</tp:member-ref> and
218 <tp:member-ref>Rejected</tp:member-ref> signals.
222 <property name="Rejections" type="a(usa{sv})" access="read"
223 tp:type="TLS_Certificate_Rejection[]" tp:name-for-bindings="Rejections">
224 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
225 <p>If the <tp:member-ref>State</tp:member-ref> is Rejected,
226 an array of <tp:type>TLS_Certificate_Rejection</tp:type>
227 structures containing the reason why the certificate is rejected.</p>
228 <p>If the <tp:member-ref>State</tp:member-ref> is not Rejected,
229 this property is not meaningful, and SHOULD be set to an empty
231 <p>The first rejection in the list MAY be assumed to be
232 the most important; if the array contains more than one
233 element, the CM MAY either use the values after the first,
238 <property name="CertificateType" type="s" access="read"
239 tp:name-for-bindings="Certificate_Type">
241 The type of this TLS certificate (e.g. 'x509' or 'pgp').
242 <p>This property is immutable</p>
246 <property name="CertificateChainData" type="aay" access="read"
247 tp:type="Certificate_Data[]" tp:name-for-bindings="Certificate_Chain_Data">
248 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
249 <p>One or more TLS certificates forming a trust chain, each encoded as
250 specified by <tp:type>Certificate_Data</tp:type>.</p>
251 <p>The first certificate in the chain MUST be the server certificate,
252 followed by the issuer's certificate, followed by the issuer's issuer
257 <signal name="Accepted"
258 tp:name-for-bindings="Accepted">
260 The <tp:member-ref>State</tp:member-ref> of this certificate has changed to Accepted.
264 <signal name="Rejected"
265 tp:name-for-bindings="Rejected">
267 The <tp:member-ref>State</tp:member-ref> of this certificate has changed to Rejected.
269 <arg name="Rejections" type="a(usa{sv})" tp:type="TLS_Certificate_Rejection[]">
271 The new value of the <tp:member-ref>Rejections</tp:member-ref> property.
276 <method name="Accept" tp:name-for-bindings="Accept">
278 Accepts this certificate, i.e. marks it as verified.
282 <method name="Reject" tp:name-for-bindings="Reject">
284 Rejects this certificate.
286 <arg direction="in" type="a(usa{sv})" name="Rejections"
287 tp:type="TLS_Certificate_Rejection[]">
288 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
289 <p>The new value of the <tp:member-ref>Rejections</tp:member-ref> property.</p>
290 <p>This MUST NOT be an empty array.</p>
294 <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
296 Raised when the method is called on an object whose <tp:member-ref>State</tp:member-ref>
297 is not <code>Pending</code>, or when the provided rejection list is empty.
300 </tp:possible-errors>
305 <!-- vim:set sw=2 sts=2 et ft=xml: -->