diff --git a/app/src/main/java/eu/faircode/email/FragmentMessages.java b/app/src/main/java/eu/faircode/email/FragmentMessages.java index 01e691916f..e1645c0531 100644 --- a/app/src/main/java/eu/faircode/email/FragmentMessages.java +++ b/app/src/main/java/eu/faircode/email/FragmentMessages.java @@ -10142,6 +10142,10 @@ public class FragmentMessages extends FragmentBase EntityCertificate record = db.certificate().getCertificate(fingerprint, email); if (record == null) known = false; + else { + args.putString("keyalgo", record.getSigAlgName()); + break; + } } String sender = null; @@ -10407,6 +10411,7 @@ public class FragmentMessages extends FragmentBase boolean valid = args.getBoolean("valid"); String reason = args.getString("reason"); String algo = args.getString("algo"); + String keyalgo = args.getString("keyalgo"); final ArrayList trace = args.getStringArrayList("trace"); EntityCertificate record = EntityCertificate.from(cert, null); @@ -10438,6 +10443,8 @@ public class FragmentMessages extends FragmentBase TextView tvBefore = dview.findViewById(R.id.tvBefore); TextView tvExpired = dview.findViewById(R.id.tvExpired); TextView tvAlgorithm = dview.findViewById(R.id.tvAlgorithm); + TextView tvKeyAlgorithmTitle = dview.findViewById(R.id.tvKeyAlgorithmTitle); + TextView tvKeyAlgorithm = dview.findViewById(R.id.tvKeyAlgorithm); tvCertificateInvalid.setVisibility(valid ? View.GONE : View.VISIBLE); tvCertificateReason.setText(reason); @@ -10456,6 +10463,12 @@ public class FragmentMessages extends FragmentBase algo = algo.replace("(?i)With", "/"); tvAlgorithm.setText(algo); + tvKeyAlgorithmTitle.setVisibility(info ? View.VISIBLE : View.GONE); + if (!TextUtils.isEmpty(keyalgo)) + keyalgo = keyalgo.replaceAll("(?i)With", "/"); + tvKeyAlgorithm.setVisibility(info ? View.VISIBLE : View.GONE); + tvKeyAlgorithm.setText(keyalgo); + ibInfo.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { diff --git a/app/src/main/res/layout/dialog_certificate.xml b/app/src/main/res/layout/dialog_certificate.xml index 57334f4dca..1542346896 100644 --- a/app/src/main/res/layout/dialog_certificate.xml +++ b/app/src/main/res/layout/dialog_certificate.xml @@ -183,5 +183,24 @@ android:textAppearance="@style/TextAppearance.AppCompat.Medium" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/tvAlgorithmTitle" /> + + + + \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 595fc03389..1d4848b0a4 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1933,6 +1933,7 @@ Signature\'s address The email address of the sender and signature do not match Algorithm + Public key Subject Validity This public key is currently not valid