Przeglądaj źródła

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 7 miesięcy temu
rodzic
commit
7923697236
No account linked to committer's email address

+ 2
- 3
android/app/src/main/java/org/saltyrtc/demo/app/Config.java Wyświetl plik

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016-2018 Threema GmbH
* Copyright (c) 2016-2019 Threema GmbH
*
* Licensed under the Apache License, Version 2.0, <see LICENSE-APACHE file>
* 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;

public class Config {
public static String HOST = "server.saltyrtc.org";
public static int PORT = 9287;
public static int PORT = 443;

public static String STUN_SERVER = "stun.l.google.com:19302";
public static String TURN_SERVER = null;
public static String TURN_USER = null;
public static String TURN_PASS = null;

public static String PUBLIC_KEY = "232385faea4c0fca2c867bfb7ca74f634178ee0bc13364ee738e02cd4318e839";
public static String PRIVATE_KEY = "c41df741435bb144edcd429d1d8e86c5e0e24ccceff87ec5e6647525c2d52077";
public static String TRUSTED_KEY = "424280166304526b4a2874a2270d091071fcc5c98959f7d4718715626df26204";
public static String SERVER_KEY = "f77fe623b6977d470ac8c7bf7011c4ad08a1d126896795db9d2b4b7a49ae1045";

+ 3
- 3
android/app/src/main/java/org/saltyrtc/demo/app/MainActivity.java Wyświetl plik

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016-2018 Threema GmbH
* Copyright (c) 2016-2019 Threema GmbH
*
* Licensed under the Apache License, Version 2.0, <see LICENSE-APACHE file>
* 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 {
private void init() throws NoSuchAlgorithmException, InvalidKeyException {
this.resetStates();

final KeyStore permanentKey = new KeyStore(Config.PUBLIC_KEY, Config.PRIVATE_KEY);
final KeyStore permanentKey = new KeyStore(Config.PRIVATE_KEY);
this.task = new WebRTCTask();
this.client = new SaltyRTCBuilder()
.connectTo(Config.HOST, Config.PORT, this.getSslContext())
@@ -394,7 +394,7 @@ public class MainActivity extends Activity {
builder.setCancelable(true);
builder.setTitle("Key Info");
final String msg = "Public key: " +
Config.PUBLIC_KEY +
new KeyStore(Config.PRIVATE_KEY).getPublicKeyHex() +
"\n\n" +
"Private key: " +
Config.PRIVATE_KEY +

+ 1
- 1
android/app/src/main/java/org/saltyrtc/demo/app/StateType.java Wyświetl plik

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016-2018 Threema GmbH
* Copyright (c) 2016-2019 Threema GmbH
*
* Licensed under the Apache License, Version 2.0, <see LICENSE-APACHE file>
* 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 Wyświetl plik

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

+ 1
- 1
android/build.gradle Wyświetl plik

@@ -6,7 +6,7 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
classpath 'com.android.tools.build:gradle:3.3.1'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files

+ 2
- 2
android/gradle/wrapper/gradle-wrapper.properties Wyświetl plik

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

+ 1
- 1
android/settings.gradle Wyświetl plik

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

+ 1
- 1
web/index.html Wyświetl plik

@@ -1,6 +1,6 @@
<!doctype html>
<!--
Copyright (c) 2016-2018 Threema GmbH
Copyright (c) 2016-2019 Threema GmbH

Licensed under the Apache License, Version 2.0, <see LICENSE-APACHE file>
or the MIT license <see LICENSE-MIT file>, at your option. This file may not be

+ 2
- 3
web/scripts.js Wyświetl plik

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

// Note: NEVER use those exact keys in production!
const PUBLIC_KEY = '424280166304526b4a2874a2270d091071fcc5c98959f7d4718715626df26204';
const PRIVATE_KEY = '74d427ae6a95dedde68850e0ff9da952acf69e6e41436230f126fbd220e1faea';
const TRUSTED_KEY = '232385faea4c0fca2c867bfb7ca74f634178ee0bc13364ee738e02cd4318e839';
const HOST = 'server.saltyrtc.org';
const PORT = 9287;
const PORT = 443;
const STUN_SERVER = 'stun.l.google.com:19302';
const TURN_SERVER = null;
const TURN_USER = null;

+ 1
- 1
web/utils.js Wyświetl plik

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

Ładowanie…
Anuluj
Zapisz