Skip to content
Snippets Groups Projects
Commit 8907525c authored by OZGCloud's avatar OZGCloud
Browse files

Merge branch 'master' of git.ozg-sh.de:mgm/pluto

parents 2c96c9ee 65e0405c
No related branches found
No related tags found
No related merge requests found
...@@ -45,6 +45,7 @@ class EMailService { ...@@ -45,6 +45,7 @@ class EMailService {
if (request.isReceiptRequired()) { if (request.isReceiptRequired()) {
requestReceipt(message, request); requestReceipt(message, request);
} }
addHeader(message, "Content-Transfer-Encoding", "quoted-printable");
send(message, request); send(message, request);
} }
......
...@@ -119,8 +119,8 @@ public class ForwardingService { ...@@ -119,8 +119,8 @@ public class ForwardingService {
return forwardingLandesnetzService.isInLandesnetz(zustaendigeStelle); return forwardingLandesnetzService.isInLandesnetz(zustaendigeStelle);
} }
MailSendRequest.MailAttachment buildZipAttachment(Vorgang vorgang, char[] password, boolean entcrypted) { MailSendRequest.MailAttachment buildZipAttachment(Vorgang vorgang, char[] password, boolean encrypted) {
var ds = new ByteArrayDataSource(zipService.buildVorgangZip(vorgang, password, entcrypted).toByteArray(), "application/zip"); var ds = new ByteArrayDataSource(zipService.buildVorgangZip(vorgang, password, encrypted).toByteArray(), "application/zip");
ds.setName(buildZipFileName(vorgang)); ds.setName(buildZipFileName(vorgang));
return MailAttachment.builder() return MailAttachment.builder()
.dataSource(ds) .dataSource(ds)
......
...@@ -31,13 +31,13 @@ class ZipBuilderService { ...@@ -31,13 +31,13 @@ class ZipBuilderService {
private static final String FILE_NAME_TEMPLATE = "%s/%s"; private static final String FILE_NAME_TEMPLATE = "%s/%s";
private final Eingang eingang; private final Eingang eingang;
private final boolean entcrypted; private final boolean encrypted;
private ZipOutputStream zipOut; private ZipOutputStream zipOut;
ZipBuilder(Vorgang vorgang, boolean entcrypted) { ZipBuilder(Vorgang vorgang, boolean encrypted) {
this.eingang = vorgang.getEingangs().get(0); this.eingang = vorgang.getEingangs().get(0);
this.entcrypted = entcrypted; this.encrypted = encrypted;
} }
ByteArrayOutputStream buildZip(char[] password) { ByteArrayOutputStream buildZip(char[] password) {
...@@ -57,7 +57,7 @@ class ZipBuilderService { ...@@ -57,7 +57,7 @@ class ZipBuilderService {
private ZipOutputStream initZipOutputStream(ByteArrayOutputStream out, char[] password) { private ZipOutputStream initZipOutputStream(ByteArrayOutputStream out, char[] password) {
try { try {
return entcrypted ? new ZipOutputStream(out, password) : new ZipOutputStream(out); return encrypted ? new ZipOutputStream(out, password) : new ZipOutputStream(out);
} catch (IOException e) { } catch (IOException e) {
throw new TechnicalException("Error writing Vorgang-ZIP", e); throw new TechnicalException("Error writing Vorgang-ZIP", e);
} }
...@@ -102,12 +102,11 @@ class ZipBuilderService { ...@@ -102,12 +102,11 @@ class ZipBuilderService {
private ZipParameters buildZipParameter(String fileName) { private ZipParameters buildZipParameter(String fileName) {
var zipParameters = new ZipParameters(); var zipParameters = new ZipParameters();
if (entcrypted) { if (encrypted) {
zipParameters.setEncryptFiles(true); zipParameters.setEncryptFiles(true);
zipParameters.setEncryptionMethod(EncryptionMethod.AES); zipParameters.setEncryptionMethod(EncryptionMethod.AES);
}
zipParameters.setAesKeyStrength(AesKeyStrength.KEY_STRENGTH_256); zipParameters.setAesKeyStrength(AesKeyStrength.KEY_STRENGTH_256);
}
zipParameters.setFileNameInZip(fileName); zipParameters.setFileNameInZip(fileName);
return zipParameters; return zipParameters;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment