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.
This commit is contained in:
Wiktor Kwapisiewicz
2018-05-22 10:16:19 +02:00
parent bc25b345fc
commit 222231066e
4 changed files with 47 additions and 0 deletions

View File

@@ -719,6 +719,21 @@
<data android:pathPattern="/..*/publickey/download" />
</intent-filter>
<!-- VIEW from Web Key Directory urls opened in a browser -->
<intent-filter android:label="@string/intent_import_key">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="https" />
<!-- if we don't specify a host, pathPattern will be ignored-->
<data android:host="*" />
<data android:pathPattern="/.well-known/openpgpkey/hu/.*" />
</intent-filter>
<!-- IMPORT_KEY with files TODO: does this work? -->
<intent-filter android:label="@string/intent_import_key">
<action android:name="org.sufficientlysecure.keychain.action.IMPORT_KEY" />