mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
gpg: Handle backsig for v5 signature.
* g10/getkey.c (merge_selfsigs_subkey): Check v5 signature correctly. -- GnuPG-bug-id: 5628 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
86cb04a23d
commit
dd2e092339
14
g10/getkey.c
14
g10/getkey.c
@ -3359,9 +3359,10 @@ merge_selfsigs_subkey (ctrl_t ctrl, kbnode_t keyblock, kbnode_t subnode)
|
|||||||
|
|
||||||
while ((p = enum_sig_subpkt (sig, 1, SIGSUBPKT_SIGNATURE,
|
while ((p = enum_sig_subpkt (sig, 1, SIGSUBPKT_SIGNATURE,
|
||||||
&n, &seq, NULL)))
|
&n, &seq, NULL)))
|
||||||
if (n > 3
|
if (n > 3
|
||||||
&& ((p[0] == 3 && p[2] == 0x19) || (p[0] == 4 && p[1] == 0x19)))
|
&& ((p[0] == 3 && p[2] == 0x19) || (p[0] == 4 && p[1] == 0x19)
|
||||||
{
|
|| (p[0] == 5 && p[1] == 0x19)))
|
||||||
|
{
|
||||||
PKT_signature *tempsig = buf_to_sig (p, n);
|
PKT_signature *tempsig = buf_to_sig (p, n);
|
||||||
if (tempsig)
|
if (tempsig)
|
||||||
{
|
{
|
||||||
@ -3384,9 +3385,10 @@ merge_selfsigs_subkey (ctrl_t ctrl, kbnode_t keyblock, kbnode_t subnode)
|
|||||||
* is located on the selfsig for convenience, not security. */
|
* is located on the selfsig for convenience, not security. */
|
||||||
while ((p = enum_sig_subpkt (sig, 0, SIGSUBPKT_SIGNATURE,
|
while ((p = enum_sig_subpkt (sig, 0, SIGSUBPKT_SIGNATURE,
|
||||||
&n, &seq, NULL)))
|
&n, &seq, NULL)))
|
||||||
if (n > 3
|
if (n > 3
|
||||||
&& ((p[0] == 3 && p[2] == 0x19) || (p[0] == 4 && p[1] == 0x19)))
|
&& ((p[0] == 3 && p[2] == 0x19) || (p[0] == 4 && p[1] == 0x19)
|
||||||
{
|
|| (p[0] == 5 && p[1] == 0x19)))
|
||||||
|
{
|
||||||
PKT_signature *tempsig = buf_to_sig (p, n);
|
PKT_signature *tempsig = buf_to_sig (p, n);
|
||||||
if (tempsig)
|
if (tempsig)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user