QtPass 2.0.0
Developer documentation
Loading...
Searching...
No Matches
gpgkeystate_p.h File Reference

Record handlers of the gpg colon-listing parser, declared separately only so the unit tests can call them; not for use outside gpgkeystate.cpp. More...

#include "userinfo.h"
#include <QStringList>
Include dependency graph for gpgkeystate_p.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void handlePubSecRecord (const QStringList &props, bool secret, UserInfo &current_user)
 Start a key from a pub or sec record: key ID, the user ID the record may carry, validity, creation and expiry time.
void handleFprRecord (const QStringList &props, UserInfo &current_user)
 Replace the key ID of the key being built with its fingerprint.

Detailed Description

Record handlers of the gpg colon-listing parser, declared separately only so the unit tests can call them; not for use outside gpgkeystate.cpp.

Definition in file gpgkeystate_p.h.

Function Documentation

◆ handleFprRecord()

void handleFprRecord ( const QStringList & props,
UserInfo & current_user )

Replace the key ID of the key being built with its fingerprint.

Only when the fpr record's value is shaped like a fingerprint (40 or 64 hex digits) and ends in the key ID already there, so a subkey's fingerprint is never taken for the primary key's.

Parameters
propsThe colon-split fields of the record.
current_userThe key being built; its key ID may be replaced.

Definition at line 96 of file gpgkeystate.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ handlePubSecRecord()

void handlePubSecRecord ( const QStringList & props,
bool secret,
UserInfo & current_user )

Start a key from a pub or sec record: key ID, the user ID the record may carry, validity, creation and expiry time.

An empty expiry field (gpg's "no expiry") leaves the date null. A record with fewer than ten fields changes nothing.

Parameters
propsThe colon-split fields of the record.
secretWhether to mark the key as having a secret part.
current_userThe key being built; filled in.

Definition at line 59 of file gpgkeystate.cpp.

Here is the call graph for this function:
Here is the caller graph for this function: