matrix_sdk_crypto/types/requests/signing_keys.rs
1// Copyright 2020 The Matrix.org Foundation C.I.C.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15use crate::types::CrossSigningKey;
16
17/// Request that will publish a cross signing identity.
18///
19/// This uploads the public cross signing key triplet.
20#[derive(Debug, Clone)]
21pub struct UploadSigningKeysRequest {
22 /// The user's master key.
23 pub master_key: Option<CrossSigningKey>,
24 /// The user's self-signing key. Must be signed with the accompanied master,
25 /// or by the user's most recently uploaded master key if no master key
26 /// is included in the request.
27 pub self_signing_key: Option<CrossSigningKey>,
28 /// The user's user-signing key. Must be signed with the accompanied master,
29 /// or by the user's most recently uploaded master key if no master key
30 /// is included in the request.
31 pub user_signing_key: Option<CrossSigningKey>,
32}