Skip to content

Commit 8c091b7

Browse files
authored
Merge branch 'master' into issue-5668-add-thunderbird-attachments-support
2 parents e299957 + aa27485 commit 8c091b7

File tree

14 files changed

+273
-321
lines changed

14 files changed

+273
-321
lines changed

conf/tsconfig.content_scripts.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"paths": {
1919
"dompurify": ["types/purify.d.ts"],
2020
"openpgp": ["../node_modules/openpgp/openpgp.d.ts"],
21-
"@openpgp/web-stream-tools": ["../node_modules/@openpgp/web-stream-tools/types/index.v4.9.d.ts"],
21+
"@openpgp/web-stream-tools": ["../node_modules/@openpgp/web-stream-tools/lib/index.d.ts"],
2222
"squire-rte": ["../node_modules/squire-rte/dist/types/Squire.d.ts"],
2323
"undici-types": ["../node_modules/undici-types/index.d.ts", "COMMENT"]
2424
},

conf/tsconfig.test.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"outDir": "../build/test",
1313
"skipLibCheck": true,
1414
"paths": {
15-
"@openpgp/web-stream-tools": ["../node_modules/@openpgp/web-stream-tools/types/index.v4.9.d.ts", "../build/streams/streams.js"]
15+
"@openpgp/web-stream-tools": ["../node_modules/@openpgp/web-stream-tools/lib/index.d.ts", "../build/generic-extension-wip/lib/streams_common.js"]
1616
}
1717
},
1818
"files": [

conf/webpack.config.js

Lines changed: 37 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,44 @@
22
//bundle the web version of @openpgp/web-stream-tools for content script
33
const path = require('path');
44

5-
module.exports = {
6-
mode: 'production',
7-
entry: {
8-
main: '../build/generic-extension-wip/lib/streams/streams.js',
9-
},
10-
output: {
11-
library: {
12-
name: 'Stream',
13-
type: 'var',
5+
module.exports = [
6+
{
7+
mode: 'production',
8+
entry: {
9+
main: '../build/generic-extension-wip/lib/streams/streams.js',
10+
},
11+
output: {
12+
library: {
13+
name: 'Stream',
14+
type: 'var',
15+
},
16+
path: path.resolve('../build/generic-extension-wip/lib'),
17+
filename: 'streams_web.js', // <--- Will be compiled to this single file
18+
},
19+
resolve: {
20+
fallback: {
21+
stream: false,
22+
},
23+
extensions: ['.js'],
1424
},
15-
path: path.resolve('../build/generic-extension-wip/lib'),
16-
filename: 'streams_web.js', // <--- Will be compiled to this single file
1725
},
18-
resolve: {
19-
fallback: {
20-
stream: false,
26+
{
27+
mode: 'production',
28+
entry: {
29+
main: '../build/generic-extension-wip/lib/streams/streams.js',
30+
},
31+
output: {
32+
library: {
33+
type: 'commonjs',
34+
},
35+
path: path.resolve('../build/generic-extension-wip/lib'),
36+
filename: 'streams_common.js', // <--- Will be compiled to this single file
37+
},
38+
resolve: {
39+
fallback: {
40+
stream: false,
41+
},
42+
extensions: ['.js'],
2143
},
22-
extensions: ['.js'],
2344
},
24-
};
45+
];

extension/js/common/core/crypto/pgp/openpgp-key.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ export class OpenPGPKey {
445445
const opt: OpenPGP.KeyOptions = { userIDs, passphrase };
446446
if (variant === 'curve25519') {
447447
opt.type = 'ecc';
448-
opt.curve = 'curve25519';
448+
opt.curve = 'curve25519Legacy';
449449
} else if (variant === 'rsa2048') {
450450
opt.type = 'rsa';
451451
opt.rsaBits = 2048;
@@ -744,6 +744,7 @@ export class OpenPGPKey {
744744
// todo: we can make it faster by manually collecting expirations from signatures?
745745
...(await Promise.all(key.subkeys.map(async subkey => OpenPGPKey.getExpirationAsDateOrUndefined(await subkey.getExpirationTime()))))
746746
.filter(Boolean)
747+
747748
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
748749
.map(expirationTime => expirationTime!.getTime())
749750
.filter(expiration => !primaryKeyExpiration || expiration < primaryKeyExpiration)

extension/js/common/core/crypto/pgp/pgp-armor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,6 @@ export class PgpArmor {
165165
}
166166

167167
public static armor(messagetype: OpenPGP.enums.armor, body: object): string {
168-
return opgp.armor(messagetype, body, undefined, undefined, undefined, opgp.config);
168+
return opgp.armor(messagetype, body, undefined, undefined, undefined, false, opgp.config);
169169
}
170170
}

0 commit comments

Comments
 (0)