Workaround incorrectly signed S/MIME

This commit is contained in:
M66B 2020-05-26 16:02:37 +02:00
parent 9f7bc0ee82
commit 73ed9d3187
1 changed files with 7 additions and 0 deletions

View File

@ -120,6 +120,7 @@ import com.google.android.material.bottomnavigation.BottomNavigationView;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.google.android.material.snackbar.Snackbar;
import org.bouncycastle.asn1.ASN1Encoding;
import org.bouncycastle.asn1.cms.Attribute;
import org.bouncycastle.asn1.cms.AttributeTable;
import org.bouncycastle.asn1.cms.CMSAttributes;
@ -5537,6 +5538,12 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
AttributeTable at = super.getSignedAttributes();
return (at == null ? null : at.remove(CMSAttributes.signingTime));
}
@Override
public byte[] getEncodedSignedAttributes() throws IOException {
// http://www.bouncycastle.org/jira/browse/BJA-587
return signedAttributeSet.getEncoded(ASN1Encoding.DL);
}
};
if (s.verify(verifier)) {