mirror of
git://git.gnupg.org/gnupg.git
synced 2024-11-11 21:48:50 +01:00
kbx: Make user id and signature data optional for OpenPGP.
* kbx/keybox-blob.c (_keybox_create_openpgp_blob): Remove restriction. -- Although self-signature and key binding signatures are required by OpenPGP, we should not enforce that in the storage backend.
This commit is contained in:
parent
57df1121c1
commit
e4aa006e48
@ -702,9 +702,6 @@ _keybox_create_openpgp_blob (KEYBOXBLOB *r_blob,
|
|||||||
|
|
||||||
*r_blob = NULL;
|
*r_blob = NULL;
|
||||||
|
|
||||||
if (!info->nuids || !info->nsigs)
|
|
||||||
return gpg_error (GPG_ERR_BAD_PUBKEY);
|
|
||||||
|
|
||||||
/* If we have a signature status vector, check that the number of
|
/* If we have a signature status vector, check that the number of
|
||||||
elements matches the actual number of signatures. */
|
elements matches the actual number of signatures. */
|
||||||
if (sigstatus && sigstatus[0] != info->nsigs)
|
if (sigstatus && sigstatus[0] != info->nsigs)
|
||||||
@ -721,19 +718,27 @@ _keybox_create_openpgp_blob (KEYBOXBLOB *r_blob,
|
|||||||
err = gpg_error_from_syserror ();
|
err = gpg_error_from_syserror ();
|
||||||
goto leave;
|
goto leave;
|
||||||
}
|
}
|
||||||
|
|
||||||
blob->nuids = info->nuids;
|
blob->nuids = info->nuids;
|
||||||
blob->uids = xtrycalloc (blob->nuids, sizeof *blob->uids );
|
if (blob->nuids)
|
||||||
if (!blob->uids)
|
|
||||||
{
|
{
|
||||||
err = gpg_error_from_syserror ();
|
blob->uids = xtrycalloc (blob->nuids, sizeof *blob->uids );
|
||||||
goto leave;
|
if (!blob->uids)
|
||||||
|
{
|
||||||
|
err = gpg_error_from_syserror ();
|
||||||
|
goto leave;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
blob->nsigs = info->nsigs;
|
blob->nsigs = info->nsigs;
|
||||||
blob->sigs = xtrycalloc (blob->nsigs, sizeof *blob->sigs );
|
if (blob->nsigs)
|
||||||
if (!blob->sigs)
|
|
||||||
{
|
{
|
||||||
err = gpg_error_from_syserror ();
|
blob->sigs = xtrycalloc (blob->nsigs, sizeof *blob->sigs );
|
||||||
goto leave;
|
if (!blob->sigs)
|
||||||
|
{
|
||||||
|
err = gpg_error_from_syserror ();
|
||||||
|
goto leave;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
err = pgp_create_key_part (blob, info);
|
err = pgp_create_key_part (blob, info);
|
||||||
|
Loading…
Reference in New Issue
Block a user