Fix minor formattings, other improvements
This commit is contained in:
@@ -1,14 +1,16 @@
|
||||
package org.mian.gitnex.helpers;
|
||||
package org.mian.gitnex.helpers.ssl;
|
||||
|
||||
/**
|
||||
* Author Georg Lukas, modified by anonTree1417
|
||||
*/
|
||||
|
||||
class MTMDecision {
|
||||
|
||||
final static int DECISION_INVALID = 0;
|
||||
final static int DECISION_ABORT = 1;
|
||||
final static int DECISION_ONCE = 2;
|
||||
final static int DECISION_ALWAYS = 3;
|
||||
|
||||
int state = DECISION_INVALID;
|
||||
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.mian.gitnex.helpers;
|
||||
package org.mian.gitnex.helpers.ssl;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
@@ -32,12 +32,14 @@ public class MemorizingActivity extends Activity {
|
||||
builder.setOnCancelListener(dialog -> onSendResult(decisionId, MTMDecision.DECISION_ABORT));
|
||||
|
||||
builder.create().show();
|
||||
|
||||
}
|
||||
|
||||
private void onSendResult(int decisionId, int decision) {
|
||||
|
||||
MemorizingTrustManager.interactResult(decisionId, decision);
|
||||
finish();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,19 +1,14 @@
|
||||
package org.mian.gitnex.helpers;
|
||||
package org.mian.gitnex.helpers.ssl;
|
||||
|
||||
import android.annotation.TargetApi;
|
||||
import android.app.Activity;
|
||||
import android.app.Notification;
|
||||
import android.app.NotificationManager;
|
||||
import android.app.PendingIntent;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.net.Uri;
|
||||
import android.os.Handler;
|
||||
import android.util.Base64;
|
||||
import android.util.SparseArray;
|
||||
import android.os.Build;
|
||||
import android.os.Handler;
|
||||
|
||||
import androidx.core.app.NotificationCompat;
|
||||
import org.mian.gitnex.R;
|
||||
import java.io.ByteArrayInputStream;
|
||||
@@ -21,20 +16,22 @@ import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.security.cert.*;
|
||||
import java.security.KeyStore;
|
||||
import java.security.KeyStoreException;
|
||||
import java.security.MessageDigest;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.util.Arrays;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import java.security.cert.CertPathValidatorException;
|
||||
import java.security.cert.Certificate;
|
||||
import java.security.cert.CertificateEncodingException;
|
||||
import java.security.cert.CertificateException;
|
||||
import java.security.cert.CertificateExpiredException;
|
||||
import java.security.cert.CertificateParsingException;
|
||||
import java.security.cert.X509Certificate;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Collection;
|
||||
import java.util.Enumeration;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import javax.net.ssl.HostnameVerifier;
|
||||
import javax.net.ssl.SSLSession;
|
||||
import javax.net.ssl.TrustManager;
|
||||
Reference in New Issue
Block a user