aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/crypto/axolotl/AxolotlServiceStub.java
blob: b0228d34bee7c615b9525d01b97d88aeb2f16fe1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
package eu.siacs.conversations.crypto.axolotl;

import android.support.annotation.NonNull;
import android.support.annotation.Nullable;

import org.whispersystems.libaxolotl.AxolotlAddress;
import org.whispersystems.libaxolotl.IdentityKey;
import org.whispersystems.libaxolotl.state.PreKeyRecord;
import org.whispersystems.libaxolotl.state.SignedPreKeyRecord;

import java.security.cert.X509Certificate;
import java.util.Collections;
import java.util.List;
import java.util.Set;

import eu.siacs.conversations.entities.Account;
import eu.siacs.conversations.entities.Contact;
import eu.siacs.conversations.entities.Conversation;
import eu.siacs.conversations.entities.Message;
import eu.siacs.conversations.xmpp.jid.Jid;

/**
 * Axolotl Service Stub implementation to avoid axolotl usage.
 */
public class AxolotlServiceStub implements AxolotlService {

    @Override
    public String getOwnFingerprint() {
        return null;
    }

    @Override
    public Set<IdentityKey> getKeysWithTrust(XmppAxolotlSession.Trust trust) {
        return Collections.emptySet();
    }

    @Override
    public Set<String> getFingerprintsForOwnSessions() {
        return Collections.emptySet();
    }

    @Override
    public Set<String> getFingerprintsForContact(Contact contact) {
        return Collections.emptySet();
    }

    @Override
    public boolean isPepBroken() {
        return true;
    }

    @Override
    public void regenerateKeys(boolean wipeOther) {

    }

    @Override
    public int getOwnDeviceId() {
        return 0;
    }

    @Override
    public Set<Integer> getOwnDeviceIds() {
        return Collections.emptySet();
    }

    @Override
    public void registerDevices(Jid jid, @NonNull Set<Integer> deviceIds) {

    }

    @Override
    public void wipeOtherPepDevices() {

    }

    @Override
    public void purgeKey(String fingerprint) {

    }

    @Override
    public void publishOwnDeviceIdIfNeeded() {

    }

    @Override
    public void publishOwnDeviceId(Set<Integer> deviceIds) {

    }

    @Override
    public void publishDeviceVerificationAndBundle(SignedPreKeyRecord signedPreKeyRecord, Set<PreKeyRecord> preKeyRecords, boolean announceAfter, boolean wipe) {

    }

    @Override
    public void publishBundlesIfNeeded(boolean announce, boolean wipe) {

    }

    @Override
    public XmppAxolotlSession.Trust getFingerprintTrust(String fingerprint) {
        return XmppAxolotlSession.Trust.TRUSTED;
    }

    @Override
    public X509Certificate getFingerprintCertificate(String fingerprint) {
        return null;
    }

    @Override
    public void setFingerprintTrust(String fingerprint, XmppAxolotlSession.Trust trust) {

    }

    @Override
    public Set<AxolotlAddress> findDevicesWithoutSession(Conversation conversation) {
        return Collections.emptySet();
    }

    @Override
    public boolean createSessionsIfNeeded(Conversation conversation) {
        return false;
    }

    @Override
    public boolean trustedSessionVerified(Conversation conversation) {
        return false;
    }

    @Nullable
    @Override
    public XmppAxolotlMessage encrypt(Message message) {
        return null;
    }

    @Override
    public void preparePayloadMessage(Message message, boolean delay) {

    }

    @Override
    public XmppAxolotlMessage fetchAxolotlMessageFromCache(Message message) {
        return null;
    }

    @Override
    public XmppAxolotlMessage.XmppAxolotlPlaintextMessage processReceivingPayloadMessage(XmppAxolotlMessage message) {
        return null;
    }

    @Override
    public XmppAxolotlMessage.XmppAxolotlKeyTransportMessage processReceivingKeyTransportMessage(XmppAxolotlMessage message) {
        return null;
    }

    @Override
    public boolean fetchMapHasErrors(List<Jid> jids) {
        return false;
    }

    @Override
    public Set<IdentityKey> getKeysWithTrust(XmppAxolotlSession.Trust trust, Jid jid) {
        return Collections.emptySet();
    }

    @Override
    public Set<IdentityKey> getKeysWithTrust(XmppAxolotlSession.Trust trust, List<Jid> jids) {
        return Collections.emptySet();
    }

    @Override
    public long getNumTrustedKeys(Jid jid) {
        return 0;
    }

    @Override
    public boolean anyTargetHasNoTrustedKeys(List<Jid> jids) {
        return false;
    }

    @Override
    public boolean isConversationAxolotlCapable(Conversation conversation) {
        return false;
    }

    @Override
    public List<Jid> getCryptoTargets(Conversation conversation) {
        return Collections.emptyList();
    }

    @Override
    public boolean hasPendingKeyFetches(Account account, List<Jid> jids) {
        return false;
    }

    @Override
    public void prepareKeyTransportMessage(Conversation conversation, OnMessageCreatedCallback onMessageCreatedCallback) {

    }

    @Override
    public void onAdvancedStreamFeaturesAvailable(Account account) {

    }
}