Messages in this thread Patch in this message | | | Subject | Re: [Keyrings] [PATCH 2/5] X.509: Support X.509 lookup by Issuer+Serial form AuthorityKeyIdentifier | From | Mimi Zohar <> | Date | Mon, 24 Nov 2014 06:58:40 -0500 |
| |
Previous post was mangled. Reposting ... ---
Don't assume that the issuer & serialNumber are specified.
Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com> --- crypto/asymmetric_keys/x509_public_key.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/crypto/asymmetric_keys/x509_public_key.c b/crypto/asymmetric_keys/x509_public_key.c index 9c1a3d6..510269f 100644 --- a/crypto/asymmetric_keys/x509_public_key.c +++ b/crypto/asymmetric_keys/x509_public_key.c @@ -9,6 +9,7 @@ * 2 of the Licence, or (at your option) any later version. */ +#define DEBUG 1 #define pr_fmt(fmt) "X.509: "fmt #include <linux/module.h> #include <linux/kernel.h> @@ -68,12 +69,14 @@ struct key *x509_request_asymmetric_key(struct key *keyring, { struct key *key; key_ref_t ref; - const char *lookup; + const char *lookup = NULL; char *req, *p; - int len; + int len = 0; - lookup = id->data; - len = id->len; + if (id) { + lookup = id->data; + len = id->len; + } if (!lookup) { lookup = skid->data; len = skid->len; -- 1.8.1.4
| |