Skip to content

Commit

Permalink
docs(packet): Improve the docs in packet.Config
Browse files Browse the repository at this point in the history
  • Loading branch information
lubux committed Nov 22, 2023
1 parent 3d55a7e commit 1408255
Showing 1 changed file with 13 additions and 16 deletions.
29 changes: 13 additions & 16 deletions openpgp/packet/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,8 @@ type Config struct {
//
// Deprecated: SK2Count should be configured in S2KConfig instead.
S2KCount int
// An S2K specifier can be stored in the secret keyring to specify
// how to convert the passphrase to a key that unlocks the secret data.
// This config allows to set this key encryption parameters.
// If nil, the default parameters are used.
// See OpenPGP crypto refresh 3.7.2.1.
// RSABits is the number of bits in new RSA keys made with NewEntity.
// If zero, then 2048 bit keys are created.
RSABits int
// The public key algorithm to use - will always create a signing primary
// key and encryption subkey.
Expand Down Expand Up @@ -134,20 +131,20 @@ type Config struct {
KnownNotations map[string]bool
// SignatureNotations is a list of Notations to be added to any signatures.
SignatureNotations []*Notation
// CheckIntendedRecipients is a flag that indicates if
// a decryption key for an encrypted and signed messages should be checked
// to be present in the signatures intended recipient list.
// In encrypt and sign intended recipients are only included if this flag is true.
// if config is nil or flag is nil, it defaults to true
// CheckIntendedRecipients controls, whether the OpenPGP Intended Recipient Fingerprint feature
// should be enabled for encryption and decryption.
// (See https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-12.html#name-intended-recipient-fingerpr).
// When the flag is set, encryption produces Intended Recipient Fingerprint signature sub-packets and decryption
// checks whether the key it was encrypted to is one of the included fingerprints in the signature.
// If the flag is disabled, no Intended Recipient Fingerprint sub-packets are created or checked.
// The default behavior, when the config or flag is nil, is to enable the feature.
CheckIntendedRecipients *bool
// CacheSessionKey is a flag that indicates
// if a session key if any should be cached and returned in
// a pgp message decryption.
// CacheSessionKey controls if decryption should return the session key used for decryption.
// If the flag is set, the session key is cached in the message details struct.
CacheSessionKey bool
// CheckPacketSequence is a flag that indicates
// if the pgp message parser should strictly check
// CheckPacketSequence is a flag that controls if the pgp message reader should strictly check
// that the packet sequence conforms with the grammar mandated by rfc4880.
// The default value is true.
// The default behavior, when the config or flag is nil, is to check he packet sequence.
CheckPacketSequence *bool
}

Expand Down

0 comments on commit 1408255

Please sign in to comment.