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.DRAFT"
21 tp:causes-havoc="experimental">
22 <tp:added version="0.19.11">(draft 1)</tp:added>
25 This object represents a TLS certificate.
28 <tp:simple-type name="Certificate_Data" array-name="Certificate_Data_List"
30 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
31 <p>The raw data contained in a TLS certificate.</p>
33 <p>For X.509 certificates (<tp:member-ref>CertificateType</tp:member-ref>
34 = "x509"), this MUST be in DER format, as defined by the
35 <a href="http://www.itu.int/ITU-T/studygroups/com17/languages/X.690-0207.pdf">X.690</a>
38 <p>For PGP certificates (<tp:member-ref>CertificateType</tp:member-ref>
39 = "pgp"), this MUST be a binary OpenPGP key as defined by section 11.1
40 of <a href="http://www.rfc-editor.org/rfc/4880.txt">RFC 4880</a>.</p>
44 <tp:struct name="TLS_Certificate_Rejection" array-name="TLS_Certificate_Rejection_List">
45 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
46 <p>Struct representing one reason why a TLS certificate was rejected.</p>
47 <p>Since there can be multiple things wrong with a TLS certificate,
48 arrays of this type are used to represent lists of reasons for
49 rejection. In that case, the most important reason SHOULD be placed
50 first in the list.</p>
53 <tp:member name="Reason" type="u"
54 tp:type="TLS_Certificate_Reject_Reason">
55 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
56 <p>The value of the TLS_Certificate_Reject_Reason enumeration for
57 this certificate rejection.
59 Clients that do not understand the <code>Error</code> member,
60 which may be implementation-specific, can use this property to
61 classify rejection reasons into common categories.
67 <tp:member name="Error" type="s"
68 tp:type="DBus_Error_Name">
69 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
70 <p>The DBus error name for this certificate rejection.</p>
71 <p>This MAY correspond to the value of the <code>Reason</code> member,
72 or MAY be a more specific D-Bus error name, perhaps implementation-specific.</p>
76 <tp:member name="Details" type="a{sv}"
77 tp:type="String_Variant_Map">
78 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
79 <p>Additional information about why the certificate was rejected.
80 This MAY also include one or more of the following well-known keys:</p>
83 <dt>user-requested (b)</dt>
84 <dd>True if the error was due to an user-requested rejection of
85 the certificate; False if there was an unrecoverable error in the
86 verification process.</dd>
87 <dt>expected-hostname (s)</dt>
88 <dd>If the rejection reason is Hostname_Mismatch, the hostname that
89 the server certificate was expected to have.</dd>
90 <dt>certificate-hostname (s)</dt>
91 <dd>If the rejection reason is Hostname_Mismatch, the hostname of
92 the certificate that was presented.
94 <p>For instance, if you try to connect to gmail.com but are presented
95 with a TLS certificate issued to evil.example.org, the error details
96 for Hostname_Mismatch MAY include:</p>
99 'expected-hostname': 'gmail.com',
100 'certificate-hostname': 'evil.example.org',
105 <dt>debug-message (s)</dt>
106 <dd>Debugging information on the error, corresponding to the
107 message part of a D-Bus error message, which SHOULD NOT be
108 displayed to users under normal circumstances</dd>
115 <tp:enum type="u" name="TLS_Certificate_State">
117 The possible states for a <tp:dbus-ref
118 namespace="org.freedesktop.Telepathy.Authentication">TLSCertificate.DRAFT</tp:dbus-ref>
122 <tp:enumvalue suffix="Pending" value="0">
124 The certificate is currently waiting to be accepted or rejected.
128 <tp:enumvalue suffix="Accepted" value="1">
130 The certificate has been verified.
134 <tp:enumvalue suffix="Rejected" value="2">
136 The certificate has been rejected.
141 <tp:enum type="u" name="TLS_Certificate_Reject_Reason">
143 Possible reasons to reject a TLS certificate.
146 <tp:enumvalue suffix="Unknown" value="0">
148 The certificate has been rejected for another reason
149 not listed in this enumeration.
153 <tp:enumvalue suffix="Untrusted" value="1">
155 The certificate is not trusted.
159 <tp:enumvalue suffix="Expired" value="2">
161 The certificate is expired.
165 <tp:enumvalue suffix="Not_Activated" value="3">
167 The certificate is not active yet.
171 <tp:enumvalue suffix="Fingerprint_Mismatch" value="4">
173 The certificate provided does not have the expected
178 <tp:enumvalue suffix="Hostname_Mismatch" value="5">
180 The hostname certified does not match the provided one.
184 <tp:enumvalue suffix="Self_Signed" value="6">
186 The certificate is self-signed.
190 <tp:enumvalue suffix="Revoked" value="7">
192 The certificate has been revoked.
196 <tp:enumvalue suffix="Insecure" value="8">
198 The certificate uses an insecure cipher algorithm, or is
199 cryptographically weak.
203 <tp:enumvalue suffix="Limit_Exceeded" value="9">
205 The length in bytes of the certificate, or the depth of the
206 certificate chain exceed the limits imposed by the crypto
212 <property name="State" type="u" access="read"
213 tp:type="TLS_Certificate_State"
214 tp:name-for-bindings="State">
216 The current state of this certificate.
217 State change notifications happen by means of the
218 <tp:member-ref>Accepted</tp:member-ref> and
219 <tp:member-ref>Rejected</tp:member-ref> signals.
223 <property name="Rejections" type="a(usa{sv})" access="read"
224 tp:type="TLS_Certificate_Rejection[]" tp:name-for-bindings="Rejections">
225 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
226 <p>If the <tp:member-ref>State</tp:member-ref> is Rejected,
227 an array of <tp:type>TLS_Certificate_Rejection</tp:type>
228 structures containing the reason why the certificate is rejected.</p>
229 <p>If the <tp:member-ref>State</tp:member-ref> is not Rejected,
230 this property is not meaningful, and SHOULD be set to an empty
232 <p>The first rejection in the list MAY be assumed to be
233 the most important; if the array contains more than one
234 element, the CM MAY either use the values after the first,
239 <property name="CertificateType" type="s" access="read"
240 tp:name-for-bindings="Certificate_Type">
242 The type of this TLS certificate (e.g. 'x509' or 'pgp').
243 <p>This property is immutable</p>
247 <property name="CertificateChainData" type="aay" access="read"
248 tp:type="Certificate_Data[]" tp:name-for-bindings="Certificate_Chain_Data">
249 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
250 <p>One or more TLS certificates forming a trust chain, each encoded as
251 specified by <tp:type>Certificate_Data</tp:type>.</p>
252 <p>The first certificate in the chain MUST be the server certificate,
253 followed by the issuer's certificate, followed by the issuer's issuer
258 <signal name="Accepted"
259 tp:name-for-bindings="Accepted">
261 The <tp:member-ref>State</tp:member-ref> of this certificate has changed to Accepted.
265 <signal name="Rejected"
266 tp:name-for-bindings="Rejected">
268 The <tp:member-ref>State</tp:member-ref> of this certificate has changed to Rejected.
270 <arg name="Rejections" type="a(usa{sv})" tp:type="TLS_Certificate_Rejection[]">
272 The new value of the <tp:member-ref>Rejections</tp:member-ref> property.
277 <method name="Accept" tp:name-for-bindings="Accept">
279 Accepts this certificate, i.e. marks it as verified.
283 <method name="Reject" tp:name-for-bindings="Reject">
285 Rejects this certificate.
287 <arg direction="in" type="a(usa{sv})" name="Rejections"
288 tp:type="TLS_Certificate_Rejection[]">
290 The new value of the <tp:member-ref>Rejections</tp:member-ref> property.
297 <!-- vim:set sw=2 sts=2 et ft=xml: -->