Allow exporting secret keys.

Requests the passphrase with a popup.

As from GPGME 1.15.0, the loopback pinentry is functional when exporting secret keys. It works fine when the exact passphrase is provided. If it's a wrong passphrase, GPGME does not generate an ::Error, but the app crashes with 'free(): double free detected in tcache 2'.

Hence, this patch cannot be committed to master.

Status : dangerous
Result : works and works not
Reason : a wrong passphrase means a crash
This commit is contained in:
SET
2020-11-20 22:41:29 +01:00
parent bb174075df
commit 82b8810f62
15 changed files with 241 additions and 142 deletions

View File

@@ -16,6 +16,7 @@
<itemPath>PopupCreate.h</itemPath>
<itemPath>PopupDeleter.h</itemPath>
<itemPath>PopupExpiryTime.h</itemPath>
<itemPath>PopupExportSecretKey.h</itemPath>
<itemPath>PopupUploader.h</itemPath>
<itemPath>SensitiveTreeTableNodeText.h</itemPath>
<itemPath>Tools.h</itemPath>
@@ -45,6 +46,7 @@
<itemPath>PopupCreate.cpp</itemPath>
<itemPath>PopupDeleter.cpp</itemPath>
<itemPath>PopupExpiryTime.cpp</itemPath>
<itemPath>PopupExportSecretKey.cpp</itemPath>
<itemPath>PopupUploader.cpp</itemPath>
<itemPath>SensitiveTreeTableNodeText.cpp</itemPath>
<itemPath>Tools.cpp</itemPath>
@@ -142,6 +144,10 @@
</item>
<item path="PopupExpiryTime.h" ex="false" tool="3" flavor2="0">
</item>
<item path="PopupExportSecretKey.cpp" ex="false" tool="1" flavor2="0">
</item>
<item path="PopupExportSecretKey.h" ex="false" tool="3" flavor2="0">
</item>
<item path="PopupUploader.cpp" ex="false" tool="1" flavor2="0">
</item>
<item path="PopupUploader.h" ex="false" tool="3" flavor2="0">
@@ -258,6 +264,10 @@
</item>
<item path="PopupExpiryTime.h" ex="false" tool="3" flavor2="0">
</item>
<item path="PopupExportSecretKey.cpp" ex="false" tool="1" flavor2="0">
</item>
<item path="PopupExportSecretKey.h" ex="false" tool="3" flavor2="0">
</item>
<item path="PopupUploader.cpp" ex="false" tool="1" flavor2="0">
</item>
<item path="PopupUploader.h" ex="false" tool="3" flavor2="0">
@@ -378,6 +388,10 @@
</item>
<item path="PopupExpiryTime.h" ex="false" tool="3" flavor2="0">
</item>
<item path="PopupExportSecretKey.cpp" ex="false" tool="1" flavor2="0">
</item>
<item path="PopupExportSecretKey.h" ex="false" tool="3" flavor2="0">
</item>
<item path="PopupUploader.cpp" ex="false" tool="1" flavor2="0">
</item>
<item path="PopupUploader.h" ex="false" tool="3" flavor2="0">