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