From: David Howells <dhowells@redhat.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: dhowells@redhat.com, linux-crypto@vger.kernel.org
Subject: Re: PKCS#7: Verify internal certificate chain
Date: Thu, 31 Jul 2014 15:04:34 +0100 [thread overview]
Message-ID: <9951.1406815474@warthog.procyon.org.uk> (raw)
In-Reply-To: <20140731093051.GE30276@mwanda>
Dan Carpenter <dan.carpenter@oracle.com> wrote:
> 193 if (x509->issuer)
> ^^^^^^^^^^^^
> Check.
>
> 194 pr_debug("- issuer %s\n", x509->issuer);
Actually, x509->subject and x509->issuer are mandatory in the ASN.1 definition
and point to empty strings if there's no name material we can use, so the
check is superfluous.
> 199 (x509->subject &&
This check too.
However, I probably should check that x509->subject is not an empty string.
> 238 pr_debug("- issuer %s\n", p->subject);
> ^^^^^^
> Also this looks like it should be "subject" instead of "issuer" but
> maybe they are the same?
This is the subject attribute of issuing certificate (that p points to), not
the issuing attribute of the subject certificate (that x509 points to).
Note this is a debugging line. x509->issuer was printed by a pr_debug()
several lines above.
David
prev parent reply other threads:[~2014-07-31 14:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-31 9:30 PKCS#7: Verify internal certificate chain Dan Carpenter
2014-07-31 14:04 ` David Howells [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9951.1406815474@warthog.procyon.org.uk \
--to=dhowells@redhat.com \
--cc=dan.carpenter@oracle.com \
--cc=linux-crypto@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox