mirror of
https://github.com/matrix-org/matrix-spec
synced 2025-12-20 16:38:37 +01:00
fix sections a bit more
This commit is contained in:
parent
0c6bd900a3
commit
9ff5456b5e
|
|
@ -556,6 +556,7 @@ Rejecting a presence invite::
|
||||||
|
|
||||||
Profiles
|
Profiles
|
||||||
--------
|
--------
|
||||||
|
|
||||||
The server API for profiles is based entirely on the following Federation
|
The server API for profiles is based entirely on the following Federation
|
||||||
Queries. There are no additional EDU or PDU types involved, other than the
|
Queries. There are no additional EDU or PDU types involved, other than the
|
||||||
implicit ``m.presence`` and ``m.room.member`` events (see section below).
|
implicit ``m.presence`` and ``m.room.member`` events (see section below).
|
||||||
|
|
@ -576,3 +577,4 @@ If the query contains the optional ``field`` key, it should give the name of a
|
||||||
result field. If such is present, then the result should contain only a field
|
result field. If such is present, then the result should contain only a field
|
||||||
of that name, with no others present. If not, the result should contain as much
|
of that name, with no others present. If not, the result should contain as much
|
||||||
of the user's profile as the home server has available and can make public.
|
of the user's profile as the home server has available and can make public.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ Signing Events
|
||||||
==============
|
==============
|
||||||
|
|
||||||
Canonical JSON
|
Canonical JSON
|
||||||
~~~~~~~~~~~~~~
|
--------------
|
||||||
|
|
||||||
Matrix events are represented using JSON objects. If we want to sign JSON
|
Matrix events are represented using JSON objects. If we want to sign JSON
|
||||||
events we need to encode the JSON as a binary string. Unfortunately the same
|
events we need to encode the JSON as a binary string. Unfortunately the same
|
||||||
|
|
@ -38,7 +38,7 @@ using this representation.
|
||||||
).encode("UTF-8")
|
).encode("UTF-8")
|
||||||
|
|
||||||
Grammar
|
Grammar
|
||||||
+++++++
|
~~~~~~~
|
||||||
|
|
||||||
Adapted from the grammar in http://tools.ietf.org/html/rfc7159 removing
|
Adapted from the grammar in http://tools.ietf.org/html/rfc7159 removing
|
||||||
insignificant whitespace, fractions, exponents and redundant character escapes
|
insignificant whitespace, fractions, exponents and redundant character escapes
|
||||||
|
|
@ -69,14 +69,14 @@ insignificant whitespace, fractions, exponents and redundant character escapes
|
||||||
/ %x75.30.30.31 (%x30-39 / %x61-66) ; u001X
|
/ %x75.30.30.31 (%x30-39 / %x61-66) ; u001X
|
||||||
|
|
||||||
Signing JSON
|
Signing JSON
|
||||||
~~~~~~~~~~~~
|
------------
|
||||||
|
|
||||||
We can now sign a JSON object by encoding it as a sequence of bytes, computing
|
We can now sign a JSON object by encoding it as a sequence of bytes, computing
|
||||||
the signature for that sequence and then adding the signature to the original
|
the signature for that sequence and then adding the signature to the original
|
||||||
JSON object.
|
JSON object.
|
||||||
|
|
||||||
Signing Details
|
Signing Details
|
||||||
+++++++++++++++
|
~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
JSON is signed by encoding the JSON object without ``signatures`` or keys grouped
|
JSON is signed by encoding the JSON object without ``signatures`` or keys grouped
|
||||||
as ``unsigned``, using the canonical encoding described above. The JSON bytes are then signed using the
|
as ``unsigned``, using the canonical encoding described above. The JSON bytes are then signed using the
|
||||||
|
|
@ -133,7 +133,7 @@ and additional signatures.
|
||||||
return json_object
|
return json_object
|
||||||
|
|
||||||
Checking for a Signature
|
Checking for a Signature
|
||||||
++++++++++++++++++++++++
|
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
To check if an entity has signed a JSON object a server does the following
|
To check if an entity has signed a JSON object a server does the following
|
||||||
|
|
||||||
|
|
@ -151,7 +151,7 @@ To check if an entity has signed a JSON object a server does the following
|
||||||
the check fails. Otherwise the check succeeds.
|
the check fails. Otherwise the check succeeds.
|
||||||
|
|
||||||
Signing Events
|
Signing Events
|
||||||
~~~~~~~~~~~~~~
|
==============
|
||||||
|
|
||||||
Signing events is a more complicated process since servers can choose to redact
|
Signing events is a more complicated process since servers can choose to redact
|
||||||
non-essential parts of an event. Before signing the event it is encoded as
|
non-essential parts of an event. Before signing the event it is encoded as
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue