summaryrefslogtreecommitdiffstats
path: root/g10/sign.c
diff options
context:
space:
mode:
authorNeal H. Walfield <neal@g10code.com>2016-11-29 14:41:22 +0100
committerNeal H. Walfield <neal@g10code.com>2016-11-29 14:56:00 +0100
commit522f74f7e377135cf098b6b0b9b35284c1dfc963 (patch)
treea5efc5605817ff6473b2149c016343716d0c00ed /g10/sign.c
parentg10: Extend TOFU_STATS to always show the validity (diff)
downloadgnupg2-522f74f7e377135cf098b6b0b9b35284c1dfc963.tar.xz
gnupg2-522f74f7e377135cf098b6b0b9b35284c1dfc963.zip
Improve some comments.
Diffstat (limited to 'g10/sign.c')
-rw-r--r--g10/sign.c32
1 files changed, 24 insertions, 8 deletions
diff --git a/g10/sign.c b/g10/sign.c
index a39112824..19ca4840c 100644
--- a/g10/sign.c
+++ b/g10/sign.c
@@ -1386,14 +1386,30 @@ sign_symencrypt_file (ctrl_t ctrl, const char *fname, strlist_t locusr)
/****************
- * Create a signature packet for the given public key certificate and
- * the user id and return it in ret_sig. User signature class SIGCLASS
- * user-id is not used (and may be NULL if sigclass is 0x20) If
- * DIGEST_ALGO is 0 the function selects an appropriate one.
- * SIGVERSION gives the minimal required signature packet version;
- * this is needed so that special properties like local sign are not
- * applied (actually: dropped) when a v3 key is used. TIMESTAMP is
- * the timestamp to use for the signature. 0 means "now" */
+ * Create a v4 signature in *RET_SIG.
+ *
+ * PK is the primary key to sign (required for all sigs)
+ * UID is the user id to sign (required for 0x10..0x13, 0x30)
+ * SUBPK is subkey to sign (required for 0x18, 0x19, 0x28)
+ *
+ * PKSK is the signing key
+ *
+ * SIGCLASS is the type of signature to create.
+ *
+ * DIGEST_ALGO is the digest algorithm. If it is 0 the function
+ * selects an appropriate one.
+ *
+ * TIMESTAMP is the timestamp to use for the signature. 0 means "now"
+ *
+ * DURATION is the amount of time (in seconds) until the signature
+ * expires.
+ *
+ * This function creates the following subpackets: issuer, created,
+ * and expire (if duration is not 0). Additional subpackets can be
+ * added using MKSUBPKT, which is called after these subpackets are
+ * added and before the signature is generated. OPAQUE is passed to
+ * MKSUBPKT.
+ */
int
make_keysig_packet (PKT_signature **ret_sig, PKT_public_key *pk,
PKT_user_id *uid, PKT_public_key *subpk,