mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
gpg: New option --include-key-block.
* common/openpgpdefs.h (SIGSUBPKT_KEY_BLOCK): New. * g10/gpg.c (oIncludeKeyBlock): New. (opts): New option --include-key-block. (main): Implement. * g10/options.h (opt): New flag include_key_block. * g10/parse-packet.c (dump_sig_subpkt): Support SIGSUBPKT_KEY_BLOCK. (parse_one_sig_subpkt): Ditto. (can_handle_critical): Ditto. * g10/sign.c (mk_sig_subpkt_key_block): New. (write_signature_packets): Call it for data signatures. -- This patch adds support for a to be proposed OpenPGP ferature: Introduce the Key Block subpacket to align OpenPGP with CMS. This new subpacket may be used similar to the CertificateSet of CMS (RFC-5652) and thus allows to start encrypted communication after having received a signed message. In practice a stripped down version of the key should be including having only the key material and the self-signatures which are really useful and shall be used by the recipient to reply encrypted. #### Key Block (1 octet with value 0, N octets of key data) This subpacket MAY be used to convey key data along with a signature of class 0x00, 0x01, or 0x02. It MUST contain the key used to create the signature; either as the primary key or as a subkey. The key SHOULD contain a primary or subkey capable of encryption and the entire key must be a valid OpenPGP key including at least one User ID packet and the corresponding self-signatures. Implementations MUST ignore this subpacket if the first octet does not have a value of zero or if the key data does not represent a valid transferable public key. GnuPG-bug-id: 4856 Signed-off-by: Werner Koch <wk@gnupg.org> Backported from master. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
2baa00ea18
commit
d79ebee64e
6 changed files with 147 additions and 11 deletions
|
@ -115,7 +115,10 @@ typedef enum
|
|||
SIGSUBPKT_FEATURES = 30, /* Feature flags. */
|
||||
|
||||
SIGSUBPKT_SIGNATURE = 32, /* Embedded signature. */
|
||||
SIGSUBPKT_ISSUER_FPR = 33, /* EXPERIMENTAL: Issuer fingerprint. */
|
||||
SIGSUBPKT_ISSUER_FPR = 33, /* Issuer fingerprint. */
|
||||
SIGSUBPKT_PREF_AEAD = 34, /* Preferred AEAD algorithms. */
|
||||
|
||||
SIGSUBPKT_KEY_BLOCK = 38, /* Entire key used. */
|
||||
|
||||
SIGSUBPKT_FLAG_CRITICAL = 128
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue