aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/crypto/axolotl/AxolotlServiceStub.java
blob: 42777b75649ff340127fd5d3b403d48e654bcaf5 (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
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.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 boolean fetchMapHasErrors(Contact contact) {
        return false;
    }

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

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

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

    @Override
    public long getNumTrustedKeys(Contact contact) {
        return 0;
    }

    @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 boolean isContactAxolotlCapable(Contact contact) {
        return false;
    }

    @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 Set<AxolotlAddress> findDevicesWithoutSession(Jid contactJid) {
        return Collections.emptySet();
    }

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

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

    @Override
    public boolean hasPendingKeyFetches(Account account, Contact contact) {
        return false;
    }

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

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

    }

    @Override
    public void prepareKeyTransportMessage(Contact contact, OnMessageCreatedCallback onMessageCreatedCallback) {

    }

    @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 void onAdvancedStreamFeaturesAvailable(Account account) {

    }
}