Browse Source

Cleanup (#4)

- Remove public key from configuration (can be derived from the private key)
- Retrieve derived public key from KeyStore (Android)
- Update gradle
- Happy new year!
- Update port for server.saltyrtc.org
master
Lennart Grahl 4 months ago
parent
commit
7923697236
No account linked to committer's email address

+ 2
- 3
android/app/src/main/java/org/saltyrtc/demo/app/Config.java View File

@@ -1,5 +1,5 @@
1 1
 /*
2
- * Copyright (c) 2016-2018 Threema GmbH
2
+ * Copyright (c) 2016-2019 Threema GmbH
3 3
  *
4 4
  * Licensed under the Apache License, Version 2.0, <see LICENSE-APACHE file>
5 5
  * or the MIT license <see LICENSE-MIT file>, at your option. This file may not be
@@ -9,14 +9,13 @@ package org.saltyrtc.demo.app;
9 9
 
10 10
 public class Config {
11 11
 	public static String HOST = "server.saltyrtc.org";
12
-	public static int PORT = 9287;
12
+	public static int PORT = 443;
13 13
 
14 14
 	public static String STUN_SERVER = "stun.l.google.com:19302";
15 15
 	public static String TURN_SERVER = null;
16 16
 	public static String TURN_USER = null;
17 17
 	public static String TURN_PASS = null;
18 18
 
19
-	public static String PUBLIC_KEY = "232385faea4c0fca2c867bfb7ca74f634178ee0bc13364ee738e02cd4318e839";
20 19
 	public static String PRIVATE_KEY = "c41df741435bb144edcd429d1d8e86c5e0e24ccceff87ec5e6647525c2d52077";
21 20
 	public static String TRUSTED_KEY = "424280166304526b4a2874a2270d091071fcc5c98959f7d4718715626df26204";
22 21
 	public static String SERVER_KEY = "f77fe623b6977d470ac8c7bf7011c4ad08a1d126896795db9d2b4b7a49ae1045";

+ 3
- 3
android/app/src/main/java/org/saltyrtc/demo/app/MainActivity.java View File

@@ -1,5 +1,5 @@
1 1
 /*
2
- * Copyright (c) 2016-2018 Threema GmbH
2
+ * Copyright (c) 2016-2019 Threema GmbH
3 3
  *
4 4
  * Licensed under the Apache License, Version 2.0, <see LICENSE-APACHE file>
5 5
  * or the MIT license <see LICENSE-MIT file>, at your option. This file may not be
@@ -114,7 +114,7 @@ public class MainActivity extends Activity {
114 114
 	private void init() throws NoSuchAlgorithmException, InvalidKeyException {
115 115
 		this.resetStates();
116 116
 
117
-		final KeyStore permanentKey = new KeyStore(Config.PUBLIC_KEY, Config.PRIVATE_KEY);
117
+		final KeyStore permanentKey = new KeyStore(Config.PRIVATE_KEY);
118 118
 		this.task = new WebRTCTask();
119 119
 		this.client = new SaltyRTCBuilder()
120 120
 				.connectTo(Config.HOST, Config.PORT, this.getSslContext())
@@ -394,7 +394,7 @@ public class MainActivity extends Activity {
394 394
 		builder.setCancelable(true);
395 395
 		builder.setTitle("Key Info");
396 396
 		final String msg = "Public key: " +
397
-				Config.PUBLIC_KEY +
397
+				new KeyStore(Config.PRIVATE_KEY).getPublicKeyHex() +
398 398
 				"\n\n" +
399 399
 				"Private key: " +
400 400
 				Config.PRIVATE_KEY +

+ 1
- 1
android/app/src/main/java/org/saltyrtc/demo/app/StateType.java View File

@@ -1,5 +1,5 @@
1 1
 /*
2
- * Copyright (c) 2016-2018 Threema GmbH
2
+ * Copyright (c) 2016-2019 Threema GmbH
3 3
  *
4 4
  * Licensed under the Apache License, Version 2.0, <see LICENSE-APACHE file>
5 5
  * or the MIT license <see LICENSE-MIT file>, at your option. This file may not be

+ 1
- 1
android/app/src/main/java/org/saltyrtc/demo/app/WebRTC.java View File

@@ -1,5 +1,5 @@
1 1
 /*
2
- * Copyright (c) 2016-2018 Threema GmbH
2
+ * Copyright (c) 2016-2019 Threema GmbH
3 3
  *
4 4
  * Licensed under the Apache License, Version 2.0, <see LICENSE-APACHE file>
5 5
  * or the MIT license <see LICENSE-MIT file>, at your option. This file may not be

+ 1
- 1
android/build.gradle View File

@@ -6,7 +6,7 @@ buildscript {
6 6
         google()
7 7
     }
8 8
     dependencies {
9
-        classpath 'com.android.tools.build:gradle:3.1.3'
9
+        classpath 'com.android.tools.build:gradle:3.3.1'
10 10
 
11 11
         // NOTE: Do not place your application dependencies here; they belong
12 12
         // in the individual module build.gradle files

+ 2
- 2
android/gradle/wrapper/gradle-wrapper.properties View File

@@ -1,6 +1,6 @@
1
-#Tue Apr 17 09:44:28 CEST 2018
1
+#Thu Feb 28 15:47:52 CET 2019
2 2
 distributionBase=GRADLE_USER_HOME
3 3
 distributionPath=wrapper/dists
4 4
 zipStoreBase=GRADLE_USER_HOME
5 5
 zipStorePath=wrapper/dists
6
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
6
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip

+ 1
- 1
android/settings.gradle View File

@@ -1 +1 @@
1
-include ':app'
1
+include ':app'

+ 1
- 1
web/index.html View File

@@ -1,6 +1,6 @@
1 1
 <!doctype html>
2 2
 <!--
3
-    Copyright (c) 2016-2018 Threema GmbH
3
+    Copyright (c) 2016-2019 Threema GmbH
4 4
 
5 5
     Licensed under the Apache License, Version 2.0, <see LICENSE-APACHE file>
6 6
     or the MIT license <see LICENSE-MIT file>, at your option. This file may not be

+ 2
- 3
web/scripts.js View File

@@ -1,6 +1,6 @@
1 1
 // noinspection JSUnusedGlobalSymbols
2 2
 /**
3
- * Copyright (c) 2016-2018 Threema GmbH
3
+ * Copyright (c) 2016-2019 Threema GmbH
4 4
  *
5 5
  * Licensed under the Apache License, Version 2.0, <see LICENSE-APACHE file>
6 6
  * or the MIT license <see LICENSE-MIT file>, at your option. This file may not be
@@ -8,11 +8,10 @@
8 8
  */
9 9
 
10 10
 // Note: NEVER use those exact keys in production!
11
-const PUBLIC_KEY = '424280166304526b4a2874a2270d091071fcc5c98959f7d4718715626df26204';
12 11
 const PRIVATE_KEY = '74d427ae6a95dedde68850e0ff9da952acf69e6e41436230f126fbd220e1faea';
13 12
 const TRUSTED_KEY = '232385faea4c0fca2c867bfb7ca74f634178ee0bc13364ee738e02cd4318e839';
14 13
 const HOST = 'server.saltyrtc.org';
15
-const PORT = 9287;
14
+const PORT = 443;
16 15
 const STUN_SERVER = 'stun.l.google.com:19302';
17 16
 const TURN_SERVER = null;
18 17
 const TURN_USER = null;

+ 1
- 1
web/utils.js View File

@@ -1,5 +1,5 @@
1 1
 /**
2
- * Copyright (c) 2016-2018 Threema GmbH
2
+ * Copyright (c) 2016-2019 Threema GmbH
3 3
  *
4 4
  * Licensed under the Apache License, Version 2.0, <see LICENSE-APACHE file>
5 5
  * or the MIT license <see LICENSE-MIT file>, at your option. This file may not be

Loading…
Cancel
Save