mirror of
https://github.com/M66B/FairEmail.git
synced 2025-03-03 10:16:45 +00:00
Fixed S/MIME canonicalization
This commit is contained in:
parent
3a4ea76b4f
commit
a9e635b997
3 changed files with 8 additions and 3 deletions
|
@ -2,10 +2,11 @@
|
||||||
|
|
||||||
### [Yaverlandia](https://en.wikipedia.org/wiki/Yaverlandia)
|
### [Yaverlandia](https://en.wikipedia.org/wiki/Yaverlandia)
|
||||||
|
|
||||||
### 1.1726b
|
### 1.1726c
|
||||||
|
|
||||||
* Following dark/light theme for original message view
|
* Following dark/light theme for original message view
|
||||||
* Added message menu item / optional button to force light theme for original message view
|
* Added message menu item / optional button to force light theme for original message view
|
||||||
|
* Fixed verifying some S/MIME signatures
|
||||||
|
|
||||||
### 1.1726
|
### 1.1726
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ apply plugin: 'kotlin-android'
|
||||||
apply plugin: 'de.undercouch.download'
|
apply plugin: 'de.undercouch.download'
|
||||||
|
|
||||||
def getVersionCode = { -> return 1726 }
|
def getVersionCode = { -> return 1726 }
|
||||||
def getRevision = { -> "\"c\"" }
|
def getRevision = { -> "\"d\"" }
|
||||||
def getReleaseName = { -> return "\"Yaverlandia\"" }
|
def getReleaseName = { -> return "\"Yaverlandia\"" }
|
||||||
// https://en.wikipedia.org/wiki/List_of_dinosaur_genera
|
// https://en.wikipedia.org/wiki/List_of_dinosaur_genera
|
||||||
|
|
||||||
|
|
|
@ -2333,9 +2333,13 @@ public class MessageHelper {
|
||||||
if (parts.length < 2)
|
if (parts.length < 2)
|
||||||
throw new ParseException("Signed part missing");
|
throw new ParseException("Signed part missing");
|
||||||
|
|
||||||
|
// PGP: https://datatracker.ietf.org/doc/html/rfc3156#section-5
|
||||||
|
// S/MIME: https://datatracker.ietf.org/doc/html/rfc8551#section-3.1.1
|
||||||
String c = parts[1]
|
String c = parts[1]
|
||||||
.replaceAll(" +$", "") // trim trailing spaces
|
|
||||||
.replaceAll("\\r?\\n", "\r\n"); // normalize new lines
|
.replaceAll("\\r?\\n", "\r\n"); // normalize new lines
|
||||||
|
if (EntityAttachment.PGP_CONTENT.equals(apart.encrypt))
|
||||||
|
c = c.replaceAll(" +$", ""); // trim trailing spaces
|
||||||
|
|
||||||
try (OutputStream os = new FileOutputStream(file)) {
|
try (OutputStream os = new FileOutputStream(file)) {
|
||||||
os.write(c.getBytes());
|
os.write(c.getBytes());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue