mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-01 04:35:57 +00:00
Added S/MIME debug info
This commit is contained in:
parent
c7f5f4d3b8
commit
9f7bc0ee82
1 changed files with 10 additions and 2 deletions
|
@ -134,6 +134,7 @@ import org.bouncycastle.cms.CMSSignedData;
|
||||||
import org.bouncycastle.cms.CMSTypedData;
|
import org.bouncycastle.cms.CMSTypedData;
|
||||||
import org.bouncycastle.cms.KeyTransRecipientId;
|
import org.bouncycastle.cms.KeyTransRecipientId;
|
||||||
import org.bouncycastle.cms.RecipientInformation;
|
import org.bouncycastle.cms.RecipientInformation;
|
||||||
|
import org.bouncycastle.cms.SignerId;
|
||||||
import org.bouncycastle.cms.SignerInformation;
|
import org.bouncycastle.cms.SignerInformation;
|
||||||
import org.bouncycastle.cms.SignerInformationStore;
|
import org.bouncycastle.cms.SignerInformationStore;
|
||||||
import org.bouncycastle.cms.SignerInformationVerifier;
|
import org.bouncycastle.cms.SignerInformationVerifier;
|
||||||
|
@ -5503,12 +5504,19 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
||||||
boolean matching = false;
|
boolean matching = false;
|
||||||
Store store = signedData.getCertificates();
|
Store store = signedData.getCertificates();
|
||||||
SignerInformationStore signerInfos = signedData.getSignerInfos();
|
SignerInformationStore signerInfos = signedData.getSignerInfos();
|
||||||
for (SignerInformation signer : signerInfos.getSigners()) {
|
Collection<SignerInformation> signers = signerInfos.getSigners();
|
||||||
for (Object match : store.getMatches(signer.getSID())) {
|
Log.i("Signers count=" + signers.size());
|
||||||
|
for (SignerInformation signer : signers) {
|
||||||
|
SignerId sid = signer.getSID();
|
||||||
|
Log.i("Checking signer=" + (sid == null ? null : sid.getIssuer()));
|
||||||
|
Collection<Object> matches = store.getMatches(sid);
|
||||||
|
Log.i("Matching certificates count=" + matches.size());
|
||||||
|
for (Object match : matches) {
|
||||||
matching = true;
|
matching = true;
|
||||||
X509CertificateHolder certHolder = (X509CertificateHolder) match;
|
X509CertificateHolder certHolder = (X509CertificateHolder) match;
|
||||||
X509Certificate cert = new JcaX509CertificateConverter()
|
X509Certificate cert = new JcaX509CertificateConverter()
|
||||||
.getCertificate(certHolder);
|
.getCertificate(certHolder);
|
||||||
|
Log.i("Checking certificate subject=" + cert.getSubjectDN());
|
||||||
try {
|
try {
|
||||||
Date signingTime;
|
Date signingTime;
|
||||||
AttributeTable at = signer.getSignedAttributes();
|
AttributeTable at = signer.getSignedAttributes();
|
||||||
|
|
Loading…
Reference in a new issue