|
CDC Badge OS
Firmware for the CDC Badge v1.0 hardware security key
|
#include "mod_gpg/GpgModule.h"#include "mod_gpg/GpgStorage.h"#include "mod_gpg/GpgRecvStore.h"#include "mod_gpg/ble_gpg_xsig.h"#include "openpgp/xsig.h"#include "cdc_core/KeyFingerprint.h"#include "cdc_core/Raii.h"#include "cdc_core/ModuleRegistry.h"#include "cdc_core/UsbManager.h"#include "cdc_ui/I18n.h"#include "mod_gpg/openpgp/ccid.h"#include "mod_gpg/openpgp/openpgp.h"#include "cdc_ui/ViewStack.h"#include "cdc_views/ListView.h"#include "cdc_views/T9InputView.h"#include "cdc_views/InfoView.h"#include "cdc_views/QRCodeView.h"#include "cdc_views/ConfirmView.h"#include "cdc_views/ToastView.h"#include "cdc_os_ui/views/PinChangeView.h"#include "cdc_core/PinManager.h"#include "cdc_core/pin_storage_c.h"#include "serial_cmd/ICommandRegistry.h"#include "serial_cmd/SubCommand.h"#include "serial_cmd/Console.h"#include "mod_gpg/gpg.h"#include "cdc_log.h"#include "esp_timer.h"#include "esp_random.h"#include "esp_attr.h"#include <new>#include <cstring>#include <cstdio>#include <cctype>Go to the source code of this file.
Classes | |
| struct | cdc::mod_gpg::WizardState |
Namespaces | |
| namespace | cdc |
| namespace | cdc::mod_gpg |
Functions | |
| static void | cdc::mod_gpg::registerStrings () |
| static void | cdc::mod_gpg::cmd_gpg_status (const char *args) |
| Serial command printing current GPG key status. | |
| static void | cdc::mod_gpg::cmd_gpg_generate (const char *args) |
| Serial command generating GPG key with selected curve and user-id. | |
| static void | cdc::mod_gpg::cmd_gpg_export (const char *args) |
| Serial command exporting GPG public key in PEM format. | |
| static void | cdc::mod_gpg::cmd_gpg_reset (const char *args) |
| static void | cdc::mod_gpg::cmd_gpg_recv_list (const char *args) |
| static void | cdc::mod_gpg::cmd_gpg_recv_info (const char *args) |
| static void | cdc::mod_gpg::cmd_gpg_recv_delete (const char *args) |
| static void | cdc::mod_gpg::cmd_gpg_cross_sign (const char *args) |
| static void | cdc::mod_gpg::cmd_gpg_export_signed (const char *args) |
| static void | cdc::mod_gpg::cmd_gpg (const char *args) |
| static void | cdc::mod_gpg::registerCommands () |
| Registers serial commands exposed by GPG module. | |
| static void | cdc::mod_gpg::fp_to_hex (const uint8_t *fp, size_t len, char *out, size_t out_size) |
| static bool | cdc::mod_gpg::parse_index (const char *args, uint8_t *out) |
| static void | cdc::mod_gpg::showStatus () |
| Displays current GPG key status and metadata. | |
| static void | cdc::mod_gpg::wizardStart () |
| Starts key-generation wizard flow. | |
| static void | cdc::mod_gpg::showExport () |
| Exports public key to serial output and QR view. | |
| static void | cdc::mod_gpg::confirmReset () |
| Opens reset confirmation dialog. | |
| static void | cdc::mod_gpg::showSettings () |
| Shows GPG settings menu. | |
| static void | cdc::mod_gpg::onSettingsSelect (uint16_t index, void *) |
| Handles settings-menu selection for PW1/PW3 change flow. | |
| static void | cdc::mod_gpg::showSendKey () |
| static void | cdc::mod_gpg::showReceivedKeys () |
| static void | cdc::mod_gpg::onMenuSelect (uint16_t, void *userData) |
| Handles GPG main-menu selections via the entry's userData tag. | |
| static ui::ListItem | cdc::mod_gpg::makeMenuItem (const char *label, GpgMenuAction action) |
| static void | cdc::mod_gpg::rebuildMenu () |
| Rebuilds GPG main menu labels and populates userData tags. | |
| static bool | cdc::mod_gpg::gpg_verify_pw1 (const char *pin) |
| Verifies OpenPGP PW1 using persistent pin-storage backend. | |
| static bool | cdc::mod_gpg::gpg_verify_pw3 (const char *pin) |
| Verifies OpenPGP PW3 using persistent pin-storage backend. | |
| static bool | cdc::mod_gpg::gpg_change_pw1 (const char *, const char *newPin) |
| Changes OpenPGP PW1 value. | |
| static bool | cdc::mod_gpg::gpg_change_pw3 (const char *, const char *newPin) |
| Changes OpenPGP PW3 value. | |
| static uint8_t | cdc::mod_gpg::gpg_retries_pw1 () |
| Returns remaining retries for OpenPGP PW1. | |
| static uint8_t | cdc::mod_gpg::gpg_retries_pw3 () |
| Returns remaining retries for OpenPGP PW3. | |
| static bool | cdc::mod_gpg::gpg_blocked_pw1 () |
| Returns whether OpenPGP PW1 is blocked. | |
| static bool | cdc::mod_gpg::gpg_blocked_pw3 () |
| Returns whether OpenPGP PW3 is blocked. | |
| static void | cdc::mod_gpg::onGpgPinComplete (bool) |
| Pin-change completion callback returning to previous view. | |
| static void | cdc::mod_gpg::onWizardName (const char *text) |
| Saves wizard name and opens email step. | |
| static void | cdc::mod_gpg::onWizardEmail (const char *text) |
| Saves wizard email and opens curve selection. | |
| static void | cdc::mod_gpg::onWizardCurve (uint16_t index, void *) |
| Finalizes wizard curve selection and triggers key generation. | |
| static void | cdc::mod_gpg::onResetConfirm (void *) |
| Confirm callback resetting all GPG key material. | |
| static void | cdc::mod_gpg::rebuildReceivedList () |
| static void | cdc::mod_gpg::onReceivedListSelect (uint16_t index, void *) |
| static void | cdc::mod_gpg::showReceivedDetail () |
| static void | cdc::mod_gpg::onReceivedActionSelect (uint16_t index, void *) |
| static void | cdc::mod_gpg::onReceivedSignConfirm (void *) |
| static void | cdc::mod_gpg::onReceivedDeleteConfirm (void *) |
| void | mod_gpg_register () |
| Registers GPG module initializer in global registry. | |
| void mod_gpg_register | ( | ) |
Registers GPG module initializer in global registry.
Definition at line 1035 of file GpgModule.cpp.
References cdc::core::ModuleRegistry::instance(), and cdc::core::ModuleRegistry::registerInitializer().
|
static |
Definition at line 36 of file GpgModule.cpp.