aboutsummaryrefslogtreecommitdiffstats
path: root/include/gpg/GpgSubKey.h
diff options
context:
space:
mode:
authorSaturneric <[email protected]>2021-05-21 16:15:54 +0000
committerSaturneric <[email protected]>2021-05-21 16:15:54 +0000
commit21f4730e92d088c06dea01684f3f736f3f9beff0 (patch)
treec1dc4dc6836903adc688b03cafabc06fc845743f /include/gpg/GpgSubKey.h
parentModified KeyList and Add Usage Support; (diff)
downloadGpgFrontend-21f4730e92d088c06dea01684f3f736f3f9beff0.tar.gz
GpgFrontend-21f4730e92d088c06dea01684f3f736f3f9beff0.zip
Expand Key Details Dialog;
Expand and Improve GpgKey and GpgSubKey; Change Interface getKeyDetails(); Code Modified; Signed-off-by: Saturneric <[email protected]>
Diffstat (limited to '')
-rw-r--r--include/gpg/GpgSubKey.h37
1 files changed, 31 insertions, 6 deletions
diff --git a/include/gpg/GpgSubKey.h b/include/gpg/GpgSubKey.h
index 1c810693..f495c709 100644
--- a/include/gpg/GpgSubKey.h
+++ b/include/gpg/GpgSubKey.h
@@ -1,18 +1,40 @@
-//
-// Created by eric on 2021/5/21.
-//
-
+/**
+ * This file is part of GPGFrontend.
+ *
+ * GPGFrontend is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Foobar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Foobar. If not, see <https://www.gnu.org/licenses/>.
+ *
+ * The initial version of the source code is inherited from gpg4usb-team.
+ * Their source code version also complies with GNU General Public License.
+ *
+ * The source code version of this software was modified and released
+ * by Saturneric<[email protected]> starting on May 12, 2021.
+ *
+ */
#ifndef GPGFRONTEND_GPGSUBKEY_H
#define GPGFRONTEND_GPGSUBKEY_H
-
-#include <gpgme.h>
+#include "GpgFrontend.h"
struct GpgSubKey {
QString id;
QString fpr;
+ QString pubkey_algo;
+
+ unsigned int length;
+
bool can_encrypt{};
bool can_sign{};
bool can_certify{};
@@ -33,6 +55,7 @@ struct GpgSubKey {
explicit GpgSubKey(gpgme_subkey_t key) {
id = key->keyid;
+ pubkey_algo = gpgme_pubkey_algo_name(key->pubkey_algo);
fpr = key->fpr;
expired = (key->expired != 0u);
@@ -40,6 +63,8 @@ struct GpgSubKey {
disabled = key->disabled;
+ length = key->length;
+
can_authenticate = key->can_authenticate;
can_certify = key->can_certify;
can_encrypt = key->can_encrypt;