]> gitweb.ps.run Git - matrix_esp_thesis/blobdiff - examples/Verify.c
update examples
[matrix_esp_thesis] / examples / Verify.c
index c9680e07fd56d89b555d8e83d9ef00f32c7357a7..7d5fc6781e7fb12de6db0c59b692af09cc7ab600 100644 (file)
@@ -4,14 +4,20 @@
 \r
 #include <stdio.h>\r
 \r
-#define SERVER       "https://matrix.org"\r
-#define USER_ID      "@pscho:matrix.org"\r
-\r
-#define DEVICE_ID    "ULZZOKJBYN"\r
-#define SENDER_KEY   "cjP41XzRlY+pd8DoiBuKQJj9o15mrx6gkrpqTkAPZ2c"\r
-#define ROOM_ID      "!XKFUjAsGrSSrpDFIxB:matrix.org"\r
-#define EVENT_ID     "$vOS09eUaI0CduqAcaIU5ZVk6ljLQfLspz7UThP8vaUM"\r
-#define SESSION_ID   "90UbGLue3ADVhvW7hFjoA2c6yg0JJKs/lPdMDZXnZAk"\r
+#define SERVER        "https://matrix.org"\r
+#define USER_ID       "@example:matrix.org"\r
+#define ROOM_ID       "!example:matrix.org"\r
+#define USERNAME      ""\r
+#define PASSWORD      ""\r
+#define DEVICE_NAME   ""\r
+\r
+// event id of an encrypted event\r
+// devices can only be verified after they used e2ee in some way\r
+// (at least in Element)\r
+#define EVENT_ID     "$example"\r
+// device id of another device to share the megolm session with\r
+// I used the device id of a logged in Element web session\r
+#define DEVICE_ID2   ""\r
 \r
 #define STATIC static\r
 \r
@@ -25,9 +31,9 @@ main(void)
     MatrixClientSetUserId(client, USER_ID);\r
 \r
     MatrixClientLoginPassword(client,\r
-        "pscho",\r
-        "Wc23EbmB9G3faMq",\r
-        "Test1");\r
+        USERNAME,\r
+        PASSWORD,\r
+        DEVICE_NAME);\r
     printf("deviceId: %s\n", client->deviceId);\r
     MatrixClientGenerateOnetimeKeys(client, 10);\r
     MatrixClientUploadOnetimeKeys(client);\r
@@ -60,7 +66,7 @@ main(void)
     printf("megolm session id: %.10s... key: %.10s...\n", megolmOutSession->id, megolmOutSession->key);\r
     MatrixClientShareMegolmOutSession(client,\r
         USER_ID,\r
-        "ULZZOKJBYN",\r
+        DEVICE_ID2,\r
         megolmOutSession);\r
 \r
     // send 10 random messages\r