Commit Graph

195 Commits

Author SHA1 Message Date
Wiktor Kwapisiewicz
222231066e Show import key dialog when clicking on WKD URL
This change extends WKD support for direct Web Key Directory URLs
similarily to Facebook key URLs and HKP URLs.

When a link with scheme `https` and path starting with
`/.well-known/openpgpkey/hu/` is clicked Android will suggest importing
the key with OpenKeychain.

Fixes #2270.
2018-05-22 22:13:00 +02:00
Wiktor Kwapisiewicz
bc25b345fc Extract out contruction of Web Key Directory URLs
Moves `toWebKeyDirectoryURL` to a separate class adding unit tests
for URL correctness as well as support for spaces at the beginning
and end of the e-mail. Spaces are frequently automatically inserted
by soft keyboards.
2018-05-22 21:32:53 +02:00
Wiktor Kwapisiewicz
fa3b32eddc Add ability to search for keys using WKD protocol
If a search pattern that looks like an email address is found
an additional query using Web Key Directory will be performed.

Implements basic flow described in "Key Discovery" [0] I-D.
Querying SRV records is not supported.

Fixes partially #2270.

[0]: https://tools.ietf.org/html/draft-koch-openpgp-webkey-service-05#section-3.1
2018-05-12 21:14:56 +02:00
Vincent Breitmoser
8edd084212 allow setting custom headers in autocrypt setup message 2018-05-03 15:27:04 +02:00
Christian Hagau
ba03969f7c Handle EdDSA & DSA SSH signatures separately in SshSignatureConverter 2018-05-01 00:00:00 +00:00
Vincent Breitmoser
ff6c4d50e3 Merge pull request #2309 from hagau/ssh_rsa_sha2_auth
Use correct signature format identifier when creating SSH signatures for RSA with SHA256 & SHA512
2018-05-01 13:55:54 +02:00
Christian Hagau
6b0ac338ca Use correct signature format identifier when creating SSH signatures for
RSA with SHA256 & SHA512
2018-04-27 00:00:00 +00:00
Vincent Breitmoser
8ad2d56f1c Add option to BackupOperation to export only secret keys 2018-04-16 22:14:38 +02:00
Vincent Breitmoser
ba9d714c1b Add Numeric9x4PassphraseUtils 2018-04-13 19:37:33 +02:00
Vincent Breitmoser
52c8824969 token: send expected result size as Le
This is a different take on 1c8cc99c68,
sending the expected result size. It's not what the spec says, but it's
what GnuPG does, so it should achieve good compatibility.
2018-03-22 17:28:44 +01:00
Vincent Breitmoser
1e7ed06698 usb: respect automatic PPS feature flag
If the feature flag is set, don't do PPS negotiation. Closes #2219
2018-03-22 16:46:46 +01:00
Vincent Breitmoser
03cbc36e23 some fixes for last updated times 2018-03-13 00:12:30 +01:00
Vincent Breitmoser
ca8835420d Remember "origin" of gossip keys 2018-03-12 12:19:47 +01:00
Vincent Breitmoser
7b268b11ed Fix up logic to match Autocrypt 1.0 2018-03-12 12:19:47 +01:00
Vincent Breitmoser
56af349cf4 add support for EdDSA on security tokens (currently only gnuk) 2018-02-20 01:04:47 +01:00
Vincent Breitmoser
982a0ce680 add sloppy test for eddsa signatures 2018-02-20 01:04:47 +01:00
Vincent Breitmoser
9a9c4408ce Add test for cv25519 encryption 2018-02-16 18:02:12 +01:00
Vincent Breitmoser
cb58f75f68 Add test for cv25519 decryption 2018-02-16 18:02:11 +01:00
Vincent Breitmoser
fa9a298bfa no longer test cv25519 as opaque key 2018-02-16 18:02:11 +01:00
Vincent Breitmoser
e57c111010 extract getRsaOperationPayload method 2018-01-24 12:02:11 +01:00
Vincent Breitmoser
dcbf57f688 update robolectric to 3.6.1 2018-01-24 03:01:04 +01:00
Vincent Breitmoser
c39aa99fc7 Merge pull request #2252 from open-keychain/refactor-securitytoken-ops
Refactor SecurityToken ops
2018-01-14 23:39:10 +01:00
Vincent Breitmoser
d956485463 add license headers 2018-01-14 04:07:19 +01:00
Vincent Breitmoser
442845f1fe Split up ResetAndWipeTokenOp a bit, and add test 2018-01-13 16:28:26 +01:00
Vincent Breitmoser
0d2cbd0654 rename methods that do io to "read*" instead of "get*" 2018-01-13 15:32:36 +01:00
Vincent Breitmoser
abf5e5d170 refactor OpenPgpCapabilities to use AutoValue 2018-01-13 15:32:36 +01:00
Vincent Breitmoser
401b90a493 rename UseCases to TokenOps, and move to operations package 2018-01-12 18:50:45 +01:00
Vincent Breitmoser
7212148913 add unit test for against commit e22cd98 2018-01-12 15:55:47 +01:00
Vincent Breitmoser
139735f0e1 refactor decryptSessionKey 2018-01-12 15:55:46 +01:00
Vincent Breitmoser
0ab71ea498 extract unit test for SecurityTokenChangeKeyUseCase 2018-01-12 15:55:31 +01:00
Vincent Breitmoser
3cf4582747 unit test for PsoDecryptUseCase 2018-01-12 15:55:31 +01:00
Vincent Breitmoser
1ed2cae2b0 Extract OpenPGP card operation logic from SecurityTokenConnection class 2018-01-12 15:55:29 +01:00
Vincent Breitmoser
510d7aa796 Merge pull request #2226 from open-keychain/multi-passphrase
Handle decryption with multiple candidate keys
2018-01-12 15:10:25 +01:00
Vincent Breitmoser
e981a1444c use Hex.decode in unit tests 2017-11-28 16:40:06 +01:00
Vincent Breitmoser
04efa9e66d check all requested keys in PassphraseDialogActivity 2017-11-28 16:18:46 +01:00
Vincent Breitmoser
66f713c847 add simple unit test for more than decryption one key candidate 2017-11-28 16:15:11 +01:00
Christian Hagau
8afc43d192 Add tests for SshSignatureConverter 2017-11-28 03:58:14 +00:00
Christian Hagau
de695fa2b0 Improve error handling for curve OID to SSH curve identifier translation 2017-11-28 03:58:14 +00:00
Christian Hagau
8d3b5c196d Fix and clean up SshPublicKeyTest 2017-11-23 12:13:18 +00:00
Christian Hagau
028d869168 Add tests for RSA, EdDSA & DSA keys in AuthenticationOperation 2017-11-23 12:13:18 +00:00
Vincent Breitmoser
bf173b1e65 use deterministic passphrase in PgpKeyOperationTest 2017-11-22 14:19:38 +01:00
Vincent Breitmoser
3a818e8cde improve security token connection unit tests 2017-11-02 19:25:08 +01:00
Dominik Schürmann
8acf62a0e8 Use check for life cycle management to determine if token supports reset 2017-11-02 19:13:44 +01:00
Dominik Schürmann
90310b7036 Read life cycle management from historical bytes 2017-11-02 18:54:41 +01:00
Christian Hagau
2619cb1db3 Add sshauthentication-api v1 support 2017-11-01 14:28:17 +00:00
Vincent Breitmoser
0021c1f15f add tests for CcidTransceiver 2017-10-29 02:42:26 +02:00
Vincent Breitmoser
95034e36b1 fix unit test 2017-10-26 17:44:13 +02:00
Vincent Breitmoser
7eb37a89d8 reduce number of token roundtrips used to obtain SecurityTokenInfo 2017-10-23 20:40:25 +02:00
Vincent Breitmoser
2812f07d34 add rudimentary unit test for SecurityTokenConnection 2017-10-23 20:40:25 +02:00
Vincent Breitmoser
edaa629f46 add unit tests for CommandApdu 2017-10-23 20:40:25 +02:00