|
|
|
@ -857,12 +857,13 @@ pgp_add_selfsigned_userid(pgp_key_t *skey, pgp_key_t *pkey, uint8_t *userid, uin
|
|
|
|
|
/* create sig for this pkt */
|
|
|
|
|
sig = pgp_create_sig_new();
|
|
|
|
|
pgp_sig_start_key_sig(sig, &skey->key.seckey.pubkey, userid, PGP_CERT_POSITIVE);
|
|
|
|
|
|
|
|
|
|
pgp_add_creation_time(sig, (uint64_t)time(NULL));
|
|
|
|
|
pgp_add_key_expiration_time(sig, (uint64_t)duration);
|
|
|
|
|
pgp_add_key_flags(sig, PGP_KEYFLAG_SIGN_DATA|PGP_KEYFLAG_ENC_COMM);
|
|
|
|
|
|
|
|
|
|
pgp_add_issuer_keyid(sig, skey->pubkeyid);
|
|
|
|
|
pgp_add_primary_userid(sig, 1);
|
|
|
|
|
pgp_add_key_flags(sig, PGP_KEYFLAG_SIGN_DATA|PGP_KEYFLAG_ENC_COMM);
|
|
|
|
|
|
|
|
|
|
pgp_end_hashed_subpkts(sig);
|
|
|
|
|
|
|
|
|
|
pgp_setup_memory_write(&sigoutput, &mem_sig, 128);
|
|
|
|
|