Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
d15107f
add private key validation test
martgil Feb 2, 2022
12565d2
issue #1253 Disable password-protected messages when FES is not used …
sosnovsky Feb 2, 2022
68b7fa4
#953 Add 'reply all' functionality (#1356)
sosnovsky Feb 3, 2022
3247987
issue #1363 remove swiftformat from Makefile (#1364)
sosnovsky Feb 4, 2022
f80b8f6
version 0.7.0: Web portal integration
tomholub Feb 4, 2022
ee74539
Bump @types/node from 17.0.14 to 17.0.15 in /Core (#1369)
dependabot[bot] Feb 7, 2022
626764a
added new spec for checking inbox pagination after loading all messag…
fcvakintos Feb 8, 2022
8a27247
issue 1358 remove DataService (#1359)
tomholub Feb 8, 2022
e5c0335
Bump @types/node from 17.0.15 to 17.0.16 in /Core (#1372)
dependabot[bot] Feb 8, 2022
bf280f4
Move strings to localiztion files (#1360)
Kharchevskyi Feb 8, 2022
e498f63
Bump @types/node from 17.0.16 to 17.0.17 in /Core (#1375)
dependabot[bot] Feb 10, 2022
f1a7dff
0.6.0 testflight feedback crashes (#1371)
ivan-ushakov Feb 12, 2022
904c8a7
updated license 1.2
tomholub Feb 12, 2022
a9e8d1c
Bump @types/node from 17.0.17 to 17.0.18 in /Core (#1382)
dependabot[bot] Feb 15, 2022
ceecb0c
version 0.7.1: Storage stability
tomholub Feb 16, 2022
ab569a3
issue #1383 disable multiple accounts test (#1384)
sosnovsky Feb 17, 2022
ec58e12
updated appium dependencies to latest version (#1385)
fcvakintos Feb 17, 2022
42ddb39
issue #1362 Upgrade to openpgp.js v5 (#1374)
IvanPizhenko Feb 18, 2022
7e1533e
Merge branch 'add-private-key-validation-test' of https://github.com/…
martgil Feb 21, 2022
87e2565
remove console.log from debug present on master branch
martgil Feb 21, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .semaphore/semaphore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ blocks:
- cache restore && make dependencies && cache store
- mv ~/appium-env ~/git/flowcrypt-ios/appium/.env
- sem-version node 16 && cache restore appium-npm && cd ./appium && npm i && cd .. && cache store appium-npm appium/node_modules
# temporary disabled because of https://github.com/ios-control/simctl/issues/30
# - brew install ideviceinstaller
# - npm install ios-deploy -g --unsafe-perm=true --allow-root
# - npm install ios-sim -g --unsafe-perm=true --allow-root
jobs:
- name: Appium UI tests
commands:
Expand Down
1 change: 1 addition & 0 deletions Core/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
build/*
tmp/*
node_modules
/test.sh
105 changes: 80 additions & 25 deletions Core/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions Core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@
"description": "TypeScript core for FlowCrypt iOS internal use",
"dependencies": {
"encoding-japanese": "^1.0.30",
"openpgp": "^5.1.0",
"sanitize-html": "2.6.1",
"@openpgp/web-stream-tools": "^0.0.9",
"zxcvbn": "4.4.2"
},
"devDependencies": {
"@types/chai": "4.3.0",
"@types/encoding-japanese": "^1.0.18",
"@types/node": "^17.0.14",
"@types/node": "^17.0.18",
"@types/node-cleanup": "2.1.2",
"ava": "4.0.1",
"babel-loader": "8.2.3",
Expand Down Expand Up @@ -41,4 +43,4 @@
"license": "SEE LICENSE IN <LICENSE>",
"private": true,
"homepage": "https://flowcrypt.com"
}
}
24 changes: 18 additions & 6 deletions Core/source/core/pgp-armor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
import { Buf } from './buf';
import { ReplaceableMsgBlockType } from './msg-block';
import { Str } from './common';
import { openpgp } from './pgp';
import { CleartextMessage, Data, Message, readCleartextMessage, readMessage } from 'openpgp';

export type PreparedForDecrypt = { isArmored: boolean, isCleartext: true, message: OpenPGP.cleartext.CleartextMessage }
| { isArmored: boolean, isCleartext: false, message: OpenPGP.message.Message };
export type PreparedForDecrypt = { isArmored: boolean, isCleartext: true, message: CleartextMessage }
| { isArmored: boolean, isCleartext: false, message: Message<Data> };

type CryptoArmorHeaderDefinitions = { readonly [type in ReplaceableMsgBlockType | 'null' | 'signature']: CryptoArmorHeaderDefinition; };
type CryptoArmorHeaderDefinition = { begin: string, middle?: string, end: string | RegExp, replace: boolean };
Expand Down Expand Up @@ -83,11 +83,23 @@ export class PgpArmor {
const isArmoredSignedOnly = utfChunk.includes(PgpArmor.headers('signedMsg').begin);
const isArmored = isArmoredEncrypted || isArmoredSignedOnly;
if (isArmoredSignedOnly) {
return { isArmored, isCleartext: true, message: await openpgp.cleartext.readArmored(new Buf(encrypted).toUtfStr()) };
return {
isArmored,
isCleartext: true,
message: await readCleartextMessage({cleartextMessage: (new Buf(encrypted)).toUtfStr()})
};
} else if (isArmoredEncrypted) {
return { isArmored, isCleartext: false, message: await openpgp.message.readArmored(new Buf(encrypted).toUtfStr()) };
return {
isArmored,
isCleartext: false,
message: await readMessage({armoredMessage: (new Buf(encrypted)).toUtfStr()})
};
} else if (encrypted instanceof Uint8Array) {
return { isArmored, isCleartext: false, message: await openpgp.message.read(encrypted) };
return {
isArmored,
isCleartext: false,
message: await readMessage({binaryMessage: encrypted})
};
}
throw new Error('Message does not have armor headers');
}
Expand Down
33 changes: 0 additions & 33 deletions Core/source/core/pgp-hash.ts

This file was deleted.

Loading